<html>
<!-- 
  Copyright 2010 Scott Logic Ltd.
  http://www.scottlogic.co.uk
  
  This file is part of Closure Charts.

  Closure Charts is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  Closure Charts is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  
  You should have received a copy of the GNU General Public License
  along with Closure Charts.  If not, see <http://www.gnu.org/licenses/>.
-->
<head>
<title>JavaScript Charting Example</title>
<script type="text/javascript">
function g(a){throw a;}var i=true,l=null,n=false;function aa(){return function(a){return a}}function ba(){return function(){}}function ca(a){return function(){return this[a]}}var p,s=this;function t(){}
function da(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array||!(a instanceof Object)&&Object.prototype.toString.call(a)=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(!(a instanceof Object)&&(Object.prototype.toString.call(a)=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call")))return"function"}else return"null";
else if(b=="function"&&typeof a.call=="undefined")return"object";return b}function ea(a){return da(a)=="array"}function fa(a){var b=da(a);return b=="array"||b=="object"&&typeof a.length=="number"}function u(a){return typeof a=="string"}function v(a){return typeof a=="number"}function ga(a){return da(a)=="function"}function ha(a){a=da(a);return a=="object"||a=="array"||a=="function"}function ia(a){return a[ja]||(a[ja]=++ka)}
var ja="closure_uid_"+Math.floor(Math.random()*2147483648).toString(36),ka=0;function la(a){return a.call.apply(a.bind,arguments)}function ma(a,b){var c=b||s;if(arguments.length>2){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,d);return a.apply(c,e)}}else return function(){return a.apply(c,arguments)}}
function na(){na=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?la:ma;return na.apply(l,arguments)}var oa=Date.now||function(){return+new Date};function w(a,b){function c(){}c.prototype=b.prototype;a.m=b.prototype;a.prototype=new c;a.prototype.constructor=a};function pa(a){this.stack=Error().stack||"";if(a)this.message=String(a)}w(pa,Error);pa.prototype.name="CustomError";function qa(a){for(var b=1;b<arguments.length;b++){var c=String(arguments[b]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,c)}return a}function ra(a,b){if(b)return a.replace(sa,"&amp;").replace(ta,"&lt;").replace(ua,"&gt;").replace(va,"&quot;");else{if(!wa.test(a))return a;if(a.indexOf("&")!=-1)a=a.replace(sa,"&amp;");if(a.indexOf("<")!=-1)a=a.replace(ta,"&lt;");if(a.indexOf(">")!=-1)a=a.replace(ua,"&gt;");if(a.indexOf('"')!=-1)a=a.replace(va,"&quot;");return a}}
var sa=/&/g,ta=/</g,ua=/>/g,va=/\"/g,wa=/[&<>\"]/;function x(a,b,c){a=c!==undefined?a.toFixed(c):String(a);c=a.indexOf(".");if(c==-1)c=a.length;return Array(Math.max(0,b-c)+1).join("0")+a}
function xa(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),h=0;c==0&&h<f;h++){var j=d[h]||"",k=e[h]||"",m=RegExp("(\\d*)(\\D*)","g"),o=RegExp("(\\d*)(\\D*)","g");do{var q=m.exec(j)||["","",""],r=o.exec(k)||["","",""];if(q[0].length==0&&r[0].length==0)break;c=ya(q[1].length==0?0:parseInt(q[1],10),r[1].length==0?0:parseInt(r[1],10))||ya(q[2].length==0,r[2].length==0)||ya(q[2],r[2])}while(c==
0)}return c}function ya(a,b){if(a<b)return-1;else if(a>b)return 1;return 0}var za=Math.random()*2147483648|0;function Aa(a,b){b.unshift(a);pa.call(this,qa.apply(l,b));b.shift();this.ke=a}w(Aa,pa);Aa.prototype.name="AssertionError";function Ba(a,b){if(!a){var c=Array.prototype.slice.call(arguments,2),d="Assertion failed";if(b){d+=": "+b;var e=c}g(new Aa(""+d,e||[]))}return a};var z=Array.prototype,Ca=z.indexOf?function(a,b,c){Ba(a.length!=l);return z.indexOf.call(a,b,c)}:function(a,b,c){c=c==l?0:c<0?Math.max(0,a.length+c):c;if(u(a)){if(!u(b)||b.length!=1)return-1;return a.indexOf(b,c)}for(c=c;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},Da=z.forEach?function(a,b,c){Ba(a.length!=l);z.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},Ea=z.map?function(a,b,c){Ba(a.length!=l);return z.map.call(a,b,
c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=u(a)?a.split(""):a,h=0;h<d;h++)if(h in f)e[h]=b.call(c,f[h],h,a);return e};function Fa(a,b){var c=Ca(a,b),d;if(d=c>=0){Ba(a.length!=l);z.splice.call(a,c,1)}return d}function Ga(){return z.concat.apply(z,arguments)}function Ha(a){if(ea(a))return Ga(a);else{for(var b=[],c=0,d=a.length;c<d;c++)b[c]=a[c];return b}}function Ia(a){Ba(a.length!=l);return z.splice.apply(a,Ja(arguments,1))}
function Ja(a,b,c){Ba(a.length!=l);return arguments.length<=2?z.slice.call(a,b):z.slice.call(a,b,c)}function Ka(a,b,c){c=c||La;for(var d=0,e=a.length,f;d<e;){var h=d+e>>1,j;j=c(b,a[h]);if(j>0)d=h+1;else{e=h;f=!j}}return f?d:~d}function La(a,b){return a>b?1:a<b?-1:0};function A(a){return a*Math.PI/180};var Ma=/#(.)(.)(.)/;function Na(a){a=a;if(!Oa.test(a))g(Error("'"+a+"' is not a valid hex color"));if(a.length==4)a=a.replace(Ma,"#$1$1$2$2$3$3");a=a.toLowerCase();return[parseInt(a.substr(1,2),16),parseInt(a.substr(3,2),16),parseInt(a.substr(5,2),16)]}
function Pa(a,b,c){a=Number(a);b=Number(b);c=Number(c);if(isNaN(a)||a<0||a>255||isNaN(b)||b<0||b>255||isNaN(c)||c<0||c>255)g(Error('"('+a+","+b+","+c+'") is not a valid RGB color'));a=Qa(a.toString(16));b=Qa(b.toString(16));c=Qa(c.toString(16));return"#"+a+b+c}var Oa=/^#(?:[0-9a-f]{3}){1,2}$/i;function Qa(a){return a.length==1?"0"+a:a}
function Ra(a,b){var c=[255,255,255],d;d=Math.min(Math.max(b,0),1);return[Math.round(d*c[0]+(1-d)*a[0]),Math.round(d*c[1]+(1-d)*a[1]),Math.round(d*c[2]+(1-d)*a[2])]};var Sa,Ta,Ua,Va,Wa;function Xa(){return s.navigator?s.navigator.userAgent:l}Wa=Va=Ua=Ta=Sa=n;var Ya;if(Ya=Xa()){var Za=s.navigator;Sa=Ya.indexOf("Opera")==0;Ta=!Sa&&Ya.indexOf("MSIE")!=-1;Va=(Ua=!Sa&&Ya.indexOf("WebKit")!=-1)&&Ya.indexOf("Mobile")!=-1;Wa=!Sa&&!Ua&&Za.product=="Gecko"}var $a=Sa,B=Ta,ab=Wa,bb=Ua,cb=Va,db=s.navigator,eb=(db&&db.platform||"").indexOf("Mac")!=-1,fb;
a:{var gb="",hb;if($a&&s.opera){var ib=s.opera.version;gb=typeof ib=="function"?ib():ib}else{if(ab)hb=/rv\:([^\);]+)(\)|;)/;else if(B)hb=/MSIE\s+([^\);]+)(\)|;)/;else if(bb)hb=/WebKit\/(\S+)/;if(hb){var jb=hb.exec(Xa());gb=jb?jb[1]:""}}if(B){var kb,lb=s.document;kb=lb?lb.documentMode:undefined;if(kb>parseFloat(gb)){fb=String(kb);break a}}fb=gb}var mb={};function nb(a){return mb[a]||(mb[a]=xa(fb,a)>=0)};var ob,pb=!B||nb("9");B&&nb("9");function qb(a){var b;b=(b=a.className)&&typeof b.split=="function"?b.split(/\s+/):[];var c;c=Ja(arguments,1);for(var d=0,e=0;e<c.length;e++)if(!(Ca(b,c[e])>=0)){b.push(c[e]);d++}c=d==c.length;a.className=b.join(" ");return c};function C(a,b){this.x=a!==undefined?a:0;this.y=b!==undefined?b:0}C.prototype.ha=function(){return new C(this.x,this.y)};C.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function D(a,b){this.width=a;this.height=b}p=D.prototype;p.ha=function(){return new D(this.width,this.height)};p.toString=function(){return"("+this.width+" x "+this.height+")"};p.Hb=function(){return!(this.width*this.height)};p.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};p.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};
p.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};p.scale=function(a){this.width*=a;this.height*=a;return this};function rb(a,b,c){for(var d in a)b.call(c,a[d],d,a)}function sb(a,b){var c;if(c=b in a)delete a[b];return c}var tb=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"];function ub(a){for(var b,c,d=1;d<arguments.length;d++){c=arguments[d];for(b in c)a[b]=c[b];for(var e=0;e<tb.length;e++){b=tb[e];if(Object.prototype.hasOwnProperty.call(c,b))a[b]=c[b]}}};function vb(a){return a?new wb(xb(a)):ob||(ob=new wb)}function yb(a,b){rb(b,function(c,d){if(d=="style")a.style.cssText=c;else if(d=="class")a.className=c;else if(d=="for")a.htmlFor=c;else if(d in zb)a.setAttribute(zb[d],c);else a[d]=c})}var zb={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder",type:"type"};function Ab(){return Bb(document,arguments)}
function Bb(a,b){var c=b[0],d=b[1];if(!pb&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',ra(d.name),'"');if(d.type){c.push(' type="',ra(d.type),'"');var e={};ub(e,d);d=e;delete d.type}c.push(">");c=c.join("")}c=a.createElement(c);if(d)if(u(d))c.className=d;else ea(d)?qb.apply(l,[c].concat(d)):yb(c,d);b.length>2&&Cb(a,c,b,2);return c}
function Cb(a,b,c,d){function e(h){if(h)b.appendChild(u(h)?a.createTextNode(h):h)}for(d=d;d<c.length;d++){var f=c[d];fa(f)&&!(ha(f)&&f.nodeType>0)?Da(Db(f)?Ha(f):f,e):e(f)}}function Eb(a){for(var b;b=a.firstChild;)a.removeChild(b)}function Fb(a){return a&&a.parentNode?a.parentNode.removeChild(a):l}function xb(a){return a.nodeType==9?a:a.ownerDocument||a.document}
function Db(a){if(a&&typeof a.length=="number")if(ha(a))return typeof a.item=="function"||typeof a.item=="string";else if(ga(a))return typeof a.item=="function";return n}function wb(a){this.Y=a||s.document||document}p=wb.prototype;p.c=function(a){return u(a)?this.Y.getElementById(a):a};p.U=function(){return Bb(this.Y,arguments)};p.createElement=function(a){return this.Y.createElement(a)};p.createTextNode=function(a){return this.Y.createTextNode(a)};
function Gb(a){a=!bb&&a.Y.compatMode=="CSS1Compat"?a.Y.documentElement:a.Y.body;return new C(a.scrollLeft,a.scrollTop)}p.appendChild=function(a,b){a.appendChild(b)};p.removeNode=Fb;p.contains=function(a,b){if(a.contains&&b.nodeType==1)return a==b||a.contains(b);if(typeof a.compareDocumentPosition!="undefined")return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a};var Hb;!B||nb("9");var Ib=B&&!nb("8");function E(){}E.prototype.Mc=n;E.prototype.ia=function(){if(!this.Mc){this.Mc=i;this.g()}};E.prototype.g=ba();function F(a,b){this.type=a;this.currentTarget=this.target=b}w(F,E);F.prototype.g=function(){delete this.type;delete this.target;delete this.currentTarget};F.prototype.Za=n;F.prototype.ob=i;F.prototype.preventDefault=function(){this.ob=n};function Jb(a,b){a&&this.Eb(a,b)}w(Jb,F);p=Jb.prototype;p.target=l;p.relatedTarget=l;p.offsetX=0;p.offsetY=0;p.clientX=0;p.clientY=0;p.screenX=0;p.screenY=0;p.button=0;p.keyCode=0;p.charCode=0;p.ctrlKey=n;p.altKey=n;p.shiftKey=n;p.metaKey=n;p.Rd=n;p.cc=l;
p.Eb=function(a,b){var c=this.type=a.type;this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(d){if(ab)try{d=d.nodeName&&d}catch(e){d=l}}else if(c=="mouseover")d=a.fromElement;else if(c=="mouseout")d=a.toElement;this.relatedTarget=d;this.offsetX=a.offsetX!==undefined?a.offsetX:a.layerX;this.offsetY=a.offsetY!==undefined?a.offsetY:a.layerY;this.clientX=a.clientX!==undefined?a.clientX:a.pageX;this.clientY=a.clientY!==undefined?a.clientY:a.pageY;this.screenX=a.screenX||0;
this.screenY=a.screenY||0;this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||(c=="keypress"?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.Rd=eb?a.metaKey:a.ctrlKey;this.Wd=a.Wd;this.cc=a;delete this.ob;delete this.Za};
p.preventDefault=function(){Jb.m.preventDefault.call(this);var a=this.cc;if(a.preventDefault)a.preventDefault();else{a.returnValue=n;if(Ib)try{if(a.ctrlKey||a.keyCode>=112&&a.keyCode<=123)a.keyCode=-1}catch(b){}}};p.g=function(){Jb.m.g.call(this);this.relatedTarget=this.currentTarget=this.target=this.cc=l};function Kb(){}var Lb=0;p=Kb.prototype;p.key=0;p.$a=n;p.Ec=n;p.Eb=function(a,b,c,d,e,f){if(ga(a))this.Vc=i;else if(a&&a.handleEvent&&ga(a.handleEvent))this.Vc=n;else g(Error("Invalid listener argument"));this.Ya=a;this.dd=b;this.src=c;this.type=d;this.capture=!!e;this.Cb=f;this.Ec=n;this.key=++Lb;this.$a=n};p.handleEvent=function(a){if(this.Vc)return this.Ya.call(this.Cb||this.src,a);return this.Ya.handleEvent.call(this.Ya,a)};function G(a,b){this.Zc=b;this.Ja=[];if(a>this.Zc)g(Error("[goog.structs.SimplePool] Initial cannot be greater than max"));for(var c=0;c<a;c++)this.Ja.push(this.ua?this.ua():{})}w(G,E);G.prototype.ua=l;G.prototype.Lc=l;function Mb(a){if(a.Ja.length)return a.Ja.pop();return a.ua?a.ua():{}}function Nb(a,b){a.Ja.length<a.Zc?a.Ja.push(b):Ob(a,b)}function Ob(a,b){if(a.Lc)a.Lc(b);else if(ha(b))if(ga(b.ia))b.ia();else for(var c in b)delete b[c]}
G.prototype.g=function(){G.m.g.call(this);for(var a=this.Ja;a.length;)Ob(this,a.pop());delete this.Ja};var Pb;var Qb=(Pb="ScriptEngine"in s&&s.ScriptEngine()=="JScript")?s.ScriptEngineMajorVersion()+"."+s.ScriptEngineMinorVersion()+"."+s.ScriptEngineBuildVersion():"0";var Rb,Sb,Tb,Ub,Vb,Wb,Xb,Yb,Zb,$b,ac;
(function(){function a(){return{n:0,ea:0}}function b(){return[]}function c(){function r(y){return h.call(r.src,r.key,y)}return r}function d(){return new Kb}function e(){return new Jb}var f=Pb&&!(xa(Qb,"5.7")>=0),h;Wb=function(r){h=r};if(f){Rb=function(){return Mb(j)};Sb=function(r){Nb(j,r)};Tb=function(){return Mb(k)};Ub=function(r){Nb(k,r)};Vb=function(){return Mb(m)};Xb=function(){Nb(m,c())};Yb=function(){return Mb(o)};Zb=function(r){Nb(o,r)};$b=function(){return Mb(q)};ac=function(r){Nb(q,r)};
var j=new G(0,600);j.ua=a;var k=new G(0,600);k.ua=b;var m=new G(0,600);m.ua=c;var o=new G(0,600);o.ua=d;var q=new G(0,600);q.ua=e}else{Rb=a;Sb=t;Tb=b;Ub=t;Vb=c;Xb=t;Yb=d;Zb=t;$b=e;ac=t}})();var bc={},H={},I={},cc={};
function J(a,b,c,d,e){if(b)if(ea(b)){for(var f=0;f<b.length;f++)J(a,b[f],c,d,e);return l}else{d=!!d;var h=H;b in h||(h[b]=Rb());h=h[b];if(!(d in h)){h[d]=Rb();h.n++}h=h[d];var j=ia(a),k;h.ea++;if(h[j]){k=h[j];for(f=0;f<k.length;f++){h=k[f];if(h.Ya==c&&h.Cb==e){if(h.$a)break;return k[f].key}}}else{k=h[j]=Tb();h.n++}f=Vb();f.src=a;h=Yb();h.Eb(c,f,a,b,d,e);c=h.key;f.key=c;k.push(h);bc[c]=h;I[j]||(I[j]=Tb());I[j].push(h);if(a.addEventListener){if(a==s||!a.Yb)a.addEventListener(b,f,d)}else a.attachEvent(dc(b),
f);return c}else g(Error("Invalid event type"))}function ec(a,b,c,d,e){if(ea(b)){for(var f=0;f<b.length;f++)ec(a,b[f],c,d,e);return l}d=!!d;a=fc(a,b,d);if(!a)return n;for(f=0;f<a.length;f++)if(a[f].Ya==c&&a[f].capture==d&&a[f].Cb==e)return gc(a[f].key);return n}
function gc(a){if(!bc[a])return n;var b=bc[a];if(b.$a)return n;var c=b.src,d=b.type,e=b.dd,f=b.capture;if(c.removeEventListener){if(c==s||!c.Yb)c.removeEventListener(d,e,f)}else c.detachEvent&&c.detachEvent(dc(d),e);c=ia(c);e=H[d][f][c];if(I[c]){var h=I[c];Fa(h,b);h.length==0&&delete I[c]}b.$a=i;e.$c=i;hc(d,f,c,e);delete bc[a];return i}
function hc(a,b,c,d){if(!d.Ib)if(d.$c){for(var e=0,f=0;e<d.length;e++)if(d[e].$a){var h=d[e].dd;h.src=l;Xb(h);Zb(d[e])}else{if(e!=f)d[f]=d[e];f++}d.length=f;d.$c=n;if(f==0){Ub(d);delete H[a][b][c];H[a][b].n--;if(H[a][b].n==0){Sb(H[a][b]);delete H[a][b];H[a].n--}if(H[a].n==0){Sb(H[a]);delete H[a]}}}}
function ic(a,b,c){var d=0,e=b==l,f=c==l;c=!!c;if(a==l)rb(I,function(k){for(var m=k.length-1;m>=0;m--){var o=k[m];if((e||b==o.type)&&(f||c==o.capture)){gc(o.key);d++}}});else{a=ia(a);if(I[a]){a=I[a];for(var h=a.length-1;h>=0;h--){var j=a[h];if((e||b==j.type)&&(f||c==j.capture)){gc(j.key);d++}}}}return d}function fc(a,b,c){var d=H;if(b in d){d=d[b];if(c in d){d=d[c];a=ia(a);if(d[a])return d[a]}}return l}function dc(a){if(a in cc)return cc[a];return cc[a]="on"+a}
function jc(a,b,c,d,e){var f=1;b=ia(b);if(a[b]){a.ea--;a=a[b];if(a.Ib)a.Ib++;else a.Ib=1;try{for(var h=a.length,j=0;j<h;j++){var k=a[j];if(k&&!k.$a)f&=kc(k,e)!==n}}finally{a.Ib--;hc(c,d,b,a)}}return Boolean(f)}function kc(a,b){var c=a.handleEvent(b);a.Ec&&gc(a.key);return c}
Wb(function(a,b){if(!bc[a])return i;var c=bc[a],d=c.type,e=H;if(!(d in e))return i;e=e[d];var f,h;if(Hb===undefined)Hb=B&&!s.addEventListener;if(Hb){var j;if(!(j=b))a:{j="window.event".split(".");for(var k=s;f=j.shift();)if(k[f])k=k[f];else{j=l;break a}j=k}f=j;j=i in e;k=n in e;if(j){if(f.keyCode<0||f.returnValue!=undefined)return i;a:{var m=n;if(f.keyCode==0)try{f.keyCode=-1;break a}catch(o){m=i}if(m||f.returnValue==undefined)f.returnValue=i}}m=$b();m.Eb(f,this);f=i;try{if(j){for(var q=Tb(),r=m.currentTarget;r;r=
r.parentNode)q.push(r);h=e[i];h.ea=h.n;for(var y=q.length-1;!m.Za&&y>=0&&h.ea;y--){m.currentTarget=q[y];f&=jc(h,q[y],d,i,m)}if(k){h=e[n];h.ea=h.n;for(y=0;!m.Za&&y<q.length&&h.ea;y++){m.currentTarget=q[y];f&=jc(h,q[y],d,n,m)}}}else f=kc(c,m)}finally{if(q){q.length=0;Ub(q)}m.ia();ac(m)}return f}d=new Jb(b,this);try{f=kc(c,d)}finally{d.ia()}return f});function K(){this.F=[];this.n=[];this.sa=[]}K.prototype.Va=l;K.prototype.V=l;K.prototype.ab=i;var lc=[];lc[0]=2;lc[1]=2;lc[2]=6;lc[3]=6;lc[4]=0;p=K.prototype;p.clear=function(){this.F.length=0;this.n.length=0;this.sa.length=0;delete this.Va;delete this.V;delete this.ab;return this};p.moveTo=function(a,b){if(this.F[this.F.length-1]==0)this.sa.length-=2;else{this.F.push(0);this.n.push(1)}this.sa.push(a,b);this.V=this.Va=[a,b];return this};
p.lineTo=function(){var a=this.F[this.F.length-1];if(a==l)g(Error("Path cannot start with lineTo"));if(a!=1){this.F.push(1);this.n.push(0)}for(a=0;a<arguments.length;a+=2){var b=arguments[a],c=arguments[a+1];this.sa.push(b,c)}this.n[this.n.length-1]+=a/2;this.V=[b,c];return this};
p.Fc=function(){var a=this.F[this.F.length-1];if(a==l)g(Error("Path cannot start with curve"));if(a!=2){this.F.push(2);this.n.push(0)}for(a=0;a<arguments.length;a+=6){var b=arguments[a+4],c=arguments[a+5];this.sa.push(arguments[a],arguments[a+1],arguments[a+2],arguments[a+3],b,c)}this.n[this.n.length-1]+=a/6;this.V=[b,c];return this};p.close=function(){var a=this.F[this.F.length-1];if(a==l)g(Error("Path cannot start with close"));if(a!=4){this.F.push(4);this.n.push(1);this.V=this.Va}return this};
p.arcTo=function(a,b,c,d){var e=this.V[0]-a*Math.cos(A(c))+a*Math.cos(A(c+d)),f=this.V[1]-b*Math.sin(A(c))+b*Math.sin(A(c+d));this.F.push(3);this.n.push(1);this.sa.push(a,b,c,d,e,f);this.ab=n;this.V=[e,f];return this};
p.vd=function(a,b,c,d){var e=this.V[0]-a*Math.cos(A(c)),f=this.V[1]-b*Math.sin(A(c)),h=A(d);d=Math.ceil(Math.abs(h)/Math.PI*2);h=h/d;c=A(c);for(var j=0;j<d;j++){var k=Math.cos(c),m=Math.sin(c),o=4/3*Math.sin(h/2)/(1+Math.cos(h/2)),q=e+(k-o*m)*a,r=f+(m+o*k)*b;c+=h;k=Math.cos(c);m=Math.sin(c);this.Fc(q,r,e+(k+o*m)*a,f+(m-o*k)*b,e+k*a,f+m*b)}return this};function mc(a,b){for(var c=a.sa,d=0,e=0,f=a.F.length;e<f;e++){var h=a.F[e],j=lc[h]*a.n[e];b(h,c.slice(d,d+j));d+=j}}
p.ha=function(){var a=new this.constructor;a.F=this.F.concat();a.n=this.n.concat();a.sa=this.sa.concat();a.Va=this.Va&&this.Va.concat();a.V=this.V&&this.V.concat();a.ab=this.ab;return a};var nc={};nc[0]=K.prototype.moveTo;nc[1]=K.prototype.lineTo;nc[4]=K.prototype.close;nc[2]=K.prototype.Fc;nc[3]=K.prototype.vd;function oc(a){if(a.ab)return a.ha();var b=new K;mc(a,function(c,d){nc[c].apply(b,d)});return b}K.prototype.Hb=function(){return this.F.length==0};function L(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}L.prototype.ha=function(){return new L(this.left,this.top,this.width,this.height)};L.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};L.prototype.contains=function(a){return a instanceof L?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};function pc(a,b){var c;a:{c=xb(a);if(c.defaultView&&c.defaultView.getComputedStyle)if(c=c.defaultView.getComputedStyle(a,l)){c=c[b]||c.getPropertyValue(b);break a}c=""}return c||(a.currentStyle?a.currentStyle[b]:l)||a.style[b]}function qc(a){var b=a.getBoundingClientRect();if(B){a=a.ownerDocument;b.left-=a.documentElement.clientLeft+a.body.clientLeft;b.top-=a.documentElement.clientTop+a.body.clientTop}return b}
function rc(a){if(B)return a.offsetParent;var b=xb(a),c=pc(a,"position"),d=c=="fixed"||c=="absolute";for(a=a.parentNode;a&&a!=b;a=a.parentNode){c=pc(a,"position");d=d&&c=="static"&&a!=b.documentElement&&a!=b.body;if(!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||c=="fixed"||c=="absolute"))return a}return l}
function sc(a){var b=new C;if(a.nodeType==1)if(a.getBoundingClientRect){var c=qc(a);b.x=c.left;b.y=c.top}else{c=Gb(vb(a));var d,e=xb(a),f=pc(a,"position"),h=ab&&e.getBoxObjectFor&&!a.getBoundingClientRect&&f=="absolute"&&(d=e.getBoxObjectFor(a))&&(d.screenX<0||d.screenY<0),j=new C(0,0),k;d=e?e.nodeType==9?e:xb(e):document;if(k=B)k=vb(d).Y.compatMode!="CSS1Compat";k=k?d.body:d.documentElement;if(a!=k)if(a.getBoundingClientRect){d=qc(a);a=Gb(vb(e));j.x=d.left+a.x;j.y=d.top+a.y}else if(e.getBoxObjectFor&&
!h){d=e.getBoxObjectFor(a);a=e.getBoxObjectFor(k);j.x=d.screenX-a.screenX;j.y=d.screenY-a.screenY}else{d=a;do{j.x+=d.offsetLeft;j.y+=d.offsetTop;if(d!=a){j.x+=d.clientLeft||0;j.y+=d.clientTop||0}if(bb&&pc(d,"position")=="fixed"){j.x+=e.body.scrollLeft;j.y+=e.body.scrollTop;break}d=d.offsetParent}while(d&&d!=a);if($a||bb&&f=="absolute")j.y-=e.body.offsetTop;for(d=a;(d=rc(d))&&d!=e.body&&d!=k;){j.x-=d.scrollLeft;if(!$a||d.tagName!="TR")j.y-=d.scrollTop}}b.x=j.x-c.x;b.y=j.y-c.y}else{b.x=a.clientX;b.y=
a.clientY}return b}function tc(a,b,c){if(b instanceof D){c=b.height;b=b.width}else{if(c==undefined)g(Error("missing height argument"));c=c}a.style.width=uc(b,i);a.style.height=uc(c,i)}function uc(a,b){if(typeof a=="number")a=(b?Math.round(a):a)+"px";return a}
function vc(a){var b=$a&&!nb("10");if(pc(a,"display")!="none")return b?new D(a.offsetWidth||a.clientWidth,a.offsetHeight||a.clientHeight):new D(a.offsetWidth,a.offsetHeight);var c=a.style,d=c.display,e=c.visibility,f=c.position;c.visibility="hidden";c.position="absolute";c.display="inline";if(b){b=a.offsetWidth||a.clientWidth;a=a.offsetHeight||a.clientHeight}else{b=a.offsetWidth;a=a.offsetHeight}c.display=d;c.position=f;c.visibility=e;return new D(b,a)};function wc(a){this.Ka=a}w(wc,E);var xc=new G(0,100);function yc(a,b,c,d,e,f){if(ea(c))for(var h=0;h<c.length;h++)yc(a,b,c[h],d,e,f);else{b=J(b,c,d||a,e||n,f||a.Ka||a);if(a.N)a.N[b]=i;else if(a.Ca){a.N=Mb(xc);a.N[a.Ca]=i;a.Ca=l;a.N[b]=i}else a.Ca=b}return a}
function zc(a,b,c,d,e,f){if(a.Ca||a.N)if(ea(c))for(var h=0;h<c.length;h++)zc(a,b,c[h],d,e,f);else{a:{d=d||a;f=f||a.Ka||a;e=!!e;if(b=fc(b,c,e))for(c=0;c<b.length;c++)if(b[c].Ya==d&&b[c].capture==e&&b[c].Cb==f){b=b[c];break a}b=l}if(b){b=b.key;gc(b);if(a.N)sb(a.N,b);else if(a.Ca==b)a.Ca=l}}return a}function Ac(a){if(a.N){for(var b in a.N){gc(b);delete a.N[b]}Nb(xc,a.N);a.N=l}else a.Ca&&gc(a.Ca)}wc.prototype.g=function(){wc.m.g.call(this);Ac(this)};wc.prototype.handleEvent=function(){g(Error("EventHandler.handleEvent not implemented"))};function Bc(){}w(Bc,E);p=Bc.prototype;p.Yb=i;p.Nb=l;p.wc=function(a){this.Nb=a};p.addEventListener=function(a,b,c,d){J(this,a,b,c,d)};p.removeEventListener=function(a,b,c,d){ec(this,a,b,c,d)};
p.dispatchEvent=function(a){a=a;if(u(a))a=new F(a,this);else if(a instanceof F)a.target=a.target||this;else{var b=a;a=new F(a.type,this);ub(a,b)}b=1;var c,d=a.type,e=H;if(d in e){e=e[d];d=i in e;var f;if(d){c=[];for(f=this;f;f=f.Nb)c.push(f);f=e[i];f.ea=f.n;for(var h=c.length-1;!a.Za&&h>=0&&f.ea;h--){a.currentTarget=c[h];b&=jc(f,c[h],a.type,i,a)&&a.ob!=n}}if(n in e){f=e[n];f.ea=f.n;if(d)for(h=0;!a.Za&&h<c.length&&f.ea;h++){a.currentTarget=c[h];b&=jc(f,c[h],a.type,n,a)&&a.ob!=n}else for(c=this;!a.Za&&
c&&f.ea;c=c.Nb){a.currentTarget=c;b&=jc(f,c,a.type,n,a)&&a.ob!=n}}a=Boolean(b)}else a=i;return a};p.g=function(){Bc.m.g.call(this);ic(this);this.Nb=l};function Cc(){}(function(a){a.Pc=function(){return a.Id||(a.Id=new a)}})(Cc);Cc.prototype.Qd=0;Cc.Pc();function M(a){this.ja=a||vb();this.Ud=Dc}w(M,Bc);M.prototype.Gd=Cc.Pc();var Dc=l;p=M.prototype;p.Ba=l;p.O=n;p.k=l;p.Ud=l;p.Pd=l;p.pa=l;p.ga=l;p.tb=l;p.Yd=n;p.c=ca("k");p.wc=function(a){if(this.pa&&this.pa!=a)g(Error("Method not supported"));M.m.wc.call(this,a)};p.U=function(){this.k=this.ja.createElement("div")};function Ec(a,b,c){if(a.O)g(Error("Component already rendered"));a.k||a.U();b?b.insertBefore(a.k,c||l):a.ja.Y.body.appendChild(a.k);if(!a.pa||a.pa.O)a.Aa()}
p.Aa=function(){this.O=i;Fc(this,function(a){!a.O&&a.c()&&a.Aa()})};p.ib=function(){Fc(this,function(a){a.O&&a.ib()});this.Ab&&Ac(this.Ab);this.O=n};p.g=function(){M.m.g.call(this);this.O&&this.ib();if(this.Ab){this.Ab.ia();delete this.Ab}Fc(this,function(a){a.ia()});!this.Yd&&this.k&&Fb(this.k);this.pa=this.Pd=this.k=this.tb=this.ga=l};function Fc(a,b,c){a.ga&&Da(a.ga,b,c)}
p.removeChild=function(a,b){if(a){var c=u(a)?a:a.Ba||(a.Ba=":"+(a.Gd.Qd++).toString(36)),d;if(this.tb&&c){d=this.tb;d=c in d?d[c]:void 0;d=d||l}else d=l;a=d;if(c&&a){sb(this.tb,c);Fa(this.ga,a);if(b){a.ib();a.k&&Fb(a.k)}c=a;if(c==l)g(Error("Unable to set parent component"));c.pa=l;M.m.wc.call(c,l)}}if(!a)g(Error("Child is not in parent component"));return a};function N(a,b,c,d,e){M.call(this,e);this.width=a;this.height=b;this.aa=c||l;this.fb=d||l}w(N,M);p=N.prototype;p.I=l;p.za=0;p.Fa=0;function Gc(a){return a.aa?new D(a.aa,a.fb):a.M()}p.M=function(){if(this.O)return vc(this.c());if(v(this.width)&&v(this.height))return new D(this.width,this.height);return l};function Hc(a){var b=a.M();return b?b.width/Gc(a).width:0}function Ic(a,b,c,d,e,f,h,j,k,m,o,q){var r=k.size/2;d=j=="bottom"?d+f-r:j=="center"?d+f/2:d+r;return a.ac(b,c,d,c+e,d,h,k,m,o,q)}p.Rb=ba();
p.Pb=ba();function Jc(a,b,c,d,e,f){if(arguments.length==6)this.setTransform(a,b,c,d,e,f);else if(arguments.length!=0)g(Error("Insufficient matrix parameters"));else{this.ba=this.da=1;this.Z=this.ca=this.ma=this.na=0}}p=Jc.prototype;p.ha=function(){return new Jc(this.ba,this.Z,this.ca,this.da,this.ma,this.na)};p.setTransform=function(a,b,c,d,e,f){if(!v(a)||!v(b)||!v(c)||!v(d)||!v(e)||!v(f))g(Error("Invalid transform parameters"));this.ba=a;this.Z=b;this.ca=c;this.da=d;this.ma=e;this.na=f;return this};
p.scale=function(a,b){this.ba*=a;this.Z*=a;this.ca*=b;this.da*=b;return this};p.translate=function(a,b){this.ma+=a*this.ba+b*this.ca;this.na+=a*this.Z+b*this.da;return this};p.rotate=function(a,b,c){a=Kc(a,b,c);b=this.ba;c=this.ca;this.ba=a.ba*b+a.Z*c;this.ca=a.ca*b+a.da*c;this.ma+=a.ma*b+a.na*c;b=this.Z;c=this.da;this.Z=a.ba*b+a.Z*c;this.da=a.ca*b+a.da*c;this.na+=a.ma*b+a.na*c;return this};p.toString=function(){return"matrix("+[this.ba,this.Z,this.ca,this.da,this.ma,this.na].join(",")+")"};
function Kc(a,b,c){var d=new Jc,e=Math.cos(a);a=Math.sin(a);return d.setTransform(e,a,-a,e,b-b*e+c*a,c-b*a-c*e)}p.va=function(a){if(this==a)return i;if(!a)return n;return this.ba==a.ba&&this.ca==a.ca&&this.ma==a.ma&&this.Z==a.Z&&this.da==a.da&&this.na==a.na};function O(a,b){this.k=a;this.h=b;this.Yb=n}w(O,Bc);p=O.prototype;p.h=l;p.k=l;p.Bc=l;p.c=ca("k");p.addEventListener=function(a,b,c,d){J(this.k,a,b,c,d)};p.removeEventListener=function(a,b,c,d){ec(this.k,a,b,c,d)};p.g=function(){O.m.g.call(this);ic(this.k)};function P(a,b,c,d){O.call(this,a,b);this.K(c);this.jd(d)}w(P,O);p=P.prototype;p.fill=l;p.bb=l;p.jd=function(a){this.fill=a;this.h.tc(this,a)};p.Cd=ca("fill");p.K=function(a){this.bb=a;this.h.uc(this,a)};p.s=ca("bb");function Lc(a,b,c,d){P.call(this,a,b,c,d)}w(Lc,P);function Mc(a,b){O.call(this,a,b)}w(Mc,O);function Nc(a,b){O.call(this,a,b)}w(Nc,O);function Oc(a,b,c,d){P.call(this,a,b,c,d)}w(Oc,P);function Pc(a,b,c,d){P.call(this,a,b,c,d)}w(Pc,P);function Qc(a){O.call(this,l,a);this.ga=[]}w(Qc,Mc);Qc.prototype.clear=function(){if(this.ga.length){this.ga.length=0;this.h.v()}};Qc.prototype.appendChild=function(a){this.ga.push(a)};Qc.prototype.ka=function(){for(var a=0,b=this.ga.length;a<b;a++)Rc(this.h,this.ga[a])};function Sc(a,b,c,d,e,f,h,j){P.call(this,a,b,h,j);this.Hc=c;this.Jc=d;this.pc=e;this.rc=f;this.i=new K;Tc(this);this.lc=new Uc(l,b,this.i,h,j)}w(Sc,Lc);
function Tc(a){a.i.clear();a.i.moveTo(a.Hc+a.pc*Math.cos(A(0)),a.Jc+a.rc*Math.sin(A(0)));a.i.arcTo(a.pc,a.rc,0,360);a.i.close()}Sc.prototype.sc=function(a,b){this.Hc=a;this.Jc=b;Tc(this);this.lc.ra(this.i)};Sc.prototype.xc=function(a,b){this.pc=a;this.rc=b;Tc(this);this.lc.ra(this.i)};Sc.prototype.ka=function(a){this.lc.ka(a)};function Uc(a,b,c,d,e){P.call(this,a,b,d,e);this.ra(c)}w(Uc,Oc);Uc.prototype.ub=n;Uc.prototype.ra=function(a){this.i=a.ab?a:oc(a);this.ub&&this.h.v()};
Uc.prototype.ka=function(a){this.ub=i;a.beginPath();mc(this.i,function(b,c){switch(b){case 0:a.moveTo(c[0],c[1]);break;case 1:for(var d=0;d<c.length;d+=2)a.lineTo(c[d],c[d+1]);break;case 2:for(d=0;d<c.length;d+=6)a.bezierCurveTo(c[d],c[d+1],c[d+2],c[d+3],c[d+4],c[d+5]);break;case 3:g(Error("Canvas paths cannot contain arcs"));case 4:a.closePath()}})};
function Vc(a,b,c,d,e,f,h,j,k,m){P.call(this,l,a,k,m);this.cb=b;this.rd=c;this.Zd=d;this.sd=e;this.$d=f;this.ud=h||"left";this.jb=j;this.k=Ab("DIV",{style:"display:table;position:absolute;padding:0;margin:0;border:0"});this.Fb=Ab("DIV",{style:"display:table-cell;padding: 0;margin: 0;border: 0"});c=this.rd;j=this.sd;d=this.Zd;e=this.$d;k=this.ud;f=this.jb;b=this.k.style;h=Hc(this.h);m=this.h;var o=m.M();m=o?o.height/Gc(m).height:0;if(c==j){b.lineHeight="90%";this.Fb.style.verticalAlign=k=="center"?
"middle":k=="left"?d<e?"top":"bottom":d<e?"bottom":"top";b.textAlign="center";j=f.size*h;b.top=Math.round(Math.min(d,e)*m)+"px";b.left=Math.round((c-j/2)*h)+"px";b.width=Math.round(j)+"px";b.height=Math.abs(d-e)*m+"px";b.fontSize=f.size*0.6*m+"px"}else{b.lineHeight="100%";this.Fb.style.verticalAlign="top";b.textAlign=k;b.top=Math.round(((d+e)/2-f.size*2/3)*m)+"px";b.left=Math.round(c*h)+"px";b.width=Math.round(Math.abs(j-c)*h)+"px";b.height="auto";b.fontSize=f.size*m+"px"}b.fontWeight=f.bold?"bold":
"normal";b.fontStyle=f.ic?"italic":"normal";b.fontFamily=f.Wa;c=this.fill;b.color=c.B||c.Oc();this.Fb.innerHTML=this.rd==this.sd?Ea(this.cb.split(""),ra).join("<br>"):ra(this.cb);a.c().appendChild(this.k);this.k.appendChild(this.Fb)}w(Vc,Pc);Vc.prototype.jd=function(a){this.fill=a;if(this.k)this.k.style.color=a.B||a.Oc()};Vc.prototype.K=ba();Vc.prototype.ka=ba();function Wc(a,b,c,d,e,f,h){O.call(this,a,b);this.Ra=c;this.Sa=d;this.pd=e;this.Qc=f;this.Vd=h}w(Wc,Nc);Wc.prototype.ub=n;
Wc.prototype.ka=function(a){if(this.Sc){this.pd&&this.Qc&&a.drawImage(this.Sc,this.Ra,this.Sa,this.pd,this.Qc);this.ub=i}else{a=new Image;a.onload=na(this.Ed,this,a);a.src=this.Vd}};Wc.prototype.Ed=function(a){this.Sc=a;this.h.v()};function Xc(a,b){this.size=a;this.Wa=b}Xc.prototype.bold=n;Xc.prototype.ic=n;function Yc(){};function Zc(a,b){this.B=a;this.mb=b||1}w(Zc,Yc);function Q(a,b){this.Q=a;this.B=b};function $c(a,b,c,d,e){N.call(this,a,b,c,d,e)}w($c,N);p=$c.prototype;p.tc=function(){this.v()};p.uc=function(){this.v()};p.vc=function(){this.v()};function ad(a,b){var c=a.getContext();c.save();var d=b.Bc?b.Bc.ha():new Jc,e=d.ma,f=d.na;if(e||f)c.translate(e,f);(d=d.Z)&&c.rotate(Math.asin(d))}p.U=function(){var a=this.ja.U("div",{style:"position:relative;overflow:hidden"});this.k=a;this.ta=this.ja.U("canvas");a.appendChild(this.ta);this.Kd=this.I=new Qc(this);this.Sd=0;bd(this)};
p.getContext=function(){this.c()||this.U();if(!this.$){this.$=this.ta.getContext("2d");this.$.save()}return this.$};p.M=function(){var a=this.width,b=this.height,c=u(a)&&a.indexOf("%")!=-1,d=u(b)&&b.indexOf("%")!=-1;if(!this.O&&(c||d))return l;var e,f;if(c){e=this.c().parentNode;f=vc(e);a=parseFloat(a)*f.width/100}if(d){e=e||this.c().parentNode;f=f||vc(e);b=parseFloat(b)*f.height/100}return new D(a,b)};
function bd(a){tc(a.c(),a.width,a.height);var b=a.M();if(b){tc(a.ta,b.width,b.height);a.ta.width=b.width;a.ta.height=b.height;a.$=l}}p.reset=function(){var a=this.getContext();a.restore();var b=this.M();b.width&&b.height&&a.clearRect(0,0,b.width,b.height);a.save()};p.clear=function(){this.reset();this.I.clear();for(var a=this.c();a.childNodes.length>1;)a.removeChild(a.lastChild)};
p.v=function(){if(this.nb)this.lb=i;else if(this.O){this.reset();if(this.aa){var a=this.M();this.getContext().scale(a.width/this.aa,a.height/this.fb)}if(this.za||this.Fa)this.getContext().translate(-this.za,-this.Fa);ad(this,this.I);this.I.ka(this.$);this.getContext().restore()}};
function Rc(a,b){if(!(b instanceof Vc)){var c=a.getContext();ad(a,b);if(!b.Cd||!b.s)b.ka(c);else{var d=b.fill;if(d)if(d instanceof Zc){if(d.mb!=0){c.globalAlpha=d.mb;c.fillStyle=d.B;b.ka(c);c.fill();c.globalAlpha=1}}else{var e=c.createLinearGradient(d.fe(),d.he(),d.ge(),d.ie());e.addColorStop(0,d.Oc());e.addColorStop(1,d.ee());c.fillStyle=e;b.ka(c);c.fill()}if(d=b.s()){b.ka(c);c.strokeStyle=d.B;d=d.Q;if(u(d)&&d.indexOf("px")!=-1)d=parseFloat(d)/Hc(a);c.lineWidth=d;c.stroke()}}a.getContext().restore()}}
p.R=function(a,b){b=b||this.I;b.appendChild(a);this.O&&!this.Sd&&!(b!=this.I&&b!=this.Kd)&&Rc(this,a)};p.$b=function(a,b,c,d,e,f,h){a=new Sc(l,this,a,b,c,d,e,f);this.R(a,h);return a};p.drawImage=function(a,b,c,d,e,f){a=new Wc(l,this,a,b,c,d,e);this.R(a,f);return a};p.ac=function(a,b,c,d,e,f,h,j,k,m){a=new Vc(this,a,b,c,d,e,f,h,j,k);this.R(a,m);return a};p.Ga=function(a,b,c,d){a=new Uc(l,this,a,b,c);this.R(a,d);return a};p.g=function(){this.$=l;$c.m.g.call(this)};
p.Aa=function(){var a=this.M();$c.m.Aa.call(this);if(!a){bd(this);this.dispatchEvent("resize")}this.v()};p.Rb=function(){this.nb=i};p.Pb=function(){this.nb=n;if(this.lb){this.v();this.lb=n}};p.yb=function(a,b){var c=vb(),d=c.U("div",{style:"position:absolute; visibility:hidden; font-family:"+b.Wa+"; font-size:"+b.size+"px;"});document.body.appendChild(d);d.innerHTML=a;var e=d.offsetWidth;c.removeNode(d);return e};function cd(a,b){this.Gb=a||1;this.rb=b||dd;this.Wb=na(this.Xd,this);this.kc=oa()}w(cd,Bc);cd.prototype.enabled=n;var dd=s.window;p=cd.prototype;p.Oa=l;p.Xd=function(){if(this.enabled){var a=oa()-this.kc;if(a>0&&a<this.Gb*0.8)this.Oa=this.rb.setTimeout(this.Wb,this.Gb-a);else{this.dispatchEvent(ed);if(this.enabled){this.Oa=this.rb.setTimeout(this.Wb,this.Gb);this.kc=oa()}}}};p.start=function(){this.enabled=i;if(!this.Oa){this.Oa=this.rb.setTimeout(this.Wb,this.Gb);this.kc=oa()}};
p.stop=function(){this.enabled=n;if(this.Oa){this.rb.clearTimeout(this.Oa);this.Oa=l}};p.g=function(){cd.m.g.call(this);this.stop();delete this.rb};var ed="tick";function fd(a,b){O.call(this,a,b)}w(fd,Mc);fd.prototype.clear=function(){Eb(this.c())};function gd(a,b,c,d){P.call(this,a,b,c,d)}w(gd,Lc);gd.prototype.sc=function(a,b){hd(this.h,this.c(),{cx:a,cy:b})};gd.prototype.xc=function(a,b){hd(this.h,this.c(),{rx:a,ry:b})};function id(a,b,c,d){P.call(this,a,b,c,d)}w(id,Oc);id.prototype.ra=function(a){a=a.Hb()?{}:{d:jd(a)};hd(this.h,this.c(),a)};function kd(a,b,c,d){P.call(this,a,b,c,d)}w(kd,Pc);function ld(a,b){O.call(this,a,b)}w(ld,Nc);function md(a,b,c,d,e){N.call(this,a,b,c,d,e);this.Kc={};this.Cc=bb&&!nb(526);this.Ka=new wc(this)}var nd;w(md,N);function od(a,b,c){b=a.ja.Y.createElementNS("http://www.w3.org/2000/svg",b);c&&hd(a,b,c);return b}function hd(a,b,c){for(var d in c)b.setAttribute(d,c[d])}p=md.prototype;p.R=function(a,b){(b||this.I).c().appendChild(a.c())};p.tc=function(a,b){var c=a.c();if(b instanceof Zc){c.setAttribute("fill",b.B);c.setAttribute("fill-opacity",b.mb)}else c.setAttribute("fill","none")};
p.uc=function(a,b){var c=a.c();if(b){c.setAttribute("stroke",b.B);var d=b.Q;u(d)&&d.indexOf("px")!=-1?c.setAttribute("stroke-width",parseFloat(d)/Hc(this)):c.setAttribute("stroke-width",d)}else c.setAttribute("stroke","none")};p.vc=function(a,b,c,d,e,f){a.c().setAttribute("transform","translate("+b+","+c+") rotate("+d+" "+e+" "+f+")")};
p.U=function(){var a=od(this,"svg",{width:this.width,height:this.height,overflow:"hidden"}),b=od(this,"g");this.Zb=od(this,"defs");this.I=new fd(b,this);a.appendChild(this.Zb);a.appendChild(b);this.k=a;if(this.aa||this.za||this.Fa){this.c().setAttribute("preserveAspectRatio","none");this.Cc?this.Tb():this.c().setAttribute("viewBox",this.za+" "+this.Fa+" "+(this.aa?this.aa+" "+this.fb:""))}};
p.Tb=function(){if(this.O&&(this.aa||this.za||!this.Fa)){var a=this.M();if(a.width==0)this.c().style.visibility="hidden";else{this.c().style.visibility="";var b=-this.za,c=-this.Fa,d=a.width/this.aa;a=a.height/this.fb;this.I.c().setAttribute("transform","scale("+d+" "+a+") translate("+b+" "+c+")")}}};
p.M=function(){if(!ab)return this.O?vc(this.c()):md.m.M.call(this);var a=this.width,b=this.height,c=u(a)&&a.indexOf("%")!=-1,d=u(b)&&b.indexOf("%")!=-1;if(!this.O&&(c||d))return l;var e,f;if(c){e=this.c().parentNode;f=vc(e);a=parseFloat(a)*f.width/100}if(d){e=e||this.c().parentNode;f=f||vc(e);b=parseFloat(b)*f.height/100}return new D(a,b)};p.clear=function(){this.I.clear();Eb(this.Zb);this.Kc={}};
p.$b=function(a,b,c,d,e,f,h){a=od(this,"ellipse",{cx:a,cy:b,rx:c,ry:d});e=new gd(a,this,e,f);this.R(e,h);return e};p.drawImage=function(a,b,c,d,e,f){a=od(this,"image",{x:a,y:b,width:c,height:d,"image-rendering":"optimizeQuality",preserveAspectRatio:"none"});a.setAttributeNS("http://www.w3.org/1999/xlink","href",e);e=new ld(a,this);this.R(e,f);return e};
p.ac=function(a,b,c,d,e,f,h,j,k,m){var o=Math.atan2(e-c,d-b)*180/Math.PI%360;o=Math.round(o*360<0?o+360:o);d=d-b;e=e-c;e=Math.round(Math.sqrt(d*d+e*e));var q=h.size;d={"font-family":h.Wa,"font-size":q};q=Math.round(c-q/2+Math.round(q*0.85));var r=b;if(f=="center"){r+=Math.round(e/2);d["text-anchor"]="middle"}else if(f=="right"){r+=e;d["text-anchor"]="end"}d.x=r;d.y=q;if(h.bold)d["font-weight"]="bold";if(h.ic)d["font-style"]="italic";if(o!=0)d.transform="rotate("+o+" "+b+" "+c+")";b=od(this,"text",
d);b.appendChild(this.ja.Y.createTextNode(a));if(j==l&&ab&&eb){a="black";if(k instanceof Zc)a=k.B;j=new Q(1,a)}k=new kd(b,this,j,k);this.R(k,m);return k};p.Ga=function(a,b,c,d){a=od(this,"path",a.Hb()?{}:{d:jd(a)});b=new id(a,this,b,c);this.R(b,d);return b};
function jd(a){var b=[];mc(a,function(c,d){switch(c){case 0:b.push("M");Array.prototype.push.apply(b,d);break;case 1:b.push("L");Array.prototype.push.apply(b,d);break;case 2:b.push("C");Array.prototype.push.apply(b,d);break;case 3:var e=d[3];b.push("A",d[0],d[1],0,Math.abs(e)>180?1:0,e>0?1:0,d[4],d[5]);break;case 4:b.push("Z")}});return b.join(" ")}
p.yb=function(a,b){var c=vb(),d=c.U("div",{style:"position:absolute; visibility:hidden; font-family:"+b.Wa+"; font-size:"+b.size+"px;"});document.body.appendChild(d);d.innerHTML=a;var e=d.offsetWidth;c.removeNode(d);return e};p.Aa=function(){var a=this.M();md.m.Aa.call(this);a||this.dispatchEvent("resize");if(this.Cc){a=this.width;var b=this.height;typeof a=="string"&&a.indexOf("%")!=-1&&typeof b=="string"&&b.indexOf("%")!=-1&&yc(this.Ka,pd(),ed,this.Tb);this.Tb()}};
p.ib=function(){md.m.ib.call(this);this.Cc&&zc(this.Ka,pd(),ed,this.Tb)};p.g=function(){delete this.Kc;delete this.Zb;delete this.I;md.m.g.call(this)};function pd(){if(!nd){nd=new cd(400);nd.start()}return nd};function qd(){return this.k=this.h.ja.c(this.Ba)||this.k}function rd(a,b){this.Ba=a.id;O.call(this,a,b)}w(rd,Mc);rd.prototype.c=qd;rd.prototype.clear=function(){Eb(this.c())};function sd(a,b,c,d,e,f,h,j){this.Ba=a.id;P.call(this,a,b,h,j);this.Gc=c;this.Ic=d;this.oc=e;this.qc=f}w(sd,Lc);sd.prototype.c=qd;sd.prototype.sc=function(a,b){this.Gc=a;this.Ic=b;td(this.c(),a-this.oc,b-this.qc,this.oc*2,this.qc*2)};sd.prototype.xc=function(a,b){this.oc=a;this.qc=b;td(this.c(),this.Gc-a,this.Ic-b,a*2,b*2)};
function ud(a,b,c,d){this.Ba=a.id;P.call(this,a,b,c,d)}w(ud,Oc);ud.prototype.c=qd;ud.prototype.ra=function(a){vd(this.c(),"path",wd(a))};function xd(a,b,c,d){this.Ba=a.id;P.call(this,a,b,c,d)}w(xd,Pc);xd.prototype.c=qd;function yd(a,b){this.Ba=a.id;O.call(this,a,b)}w(yd,Nc);yd.prototype.c=qd;function zd(a,b,c,d,e){N.call(this,a,b,c,d,e);this.Ka=new wc(this)}w(zd,N);var Ad=document.documentMode&&document.documentMode>=8;function Bd(a){var b;if(b=u(a)){b=a.length-1;b=b>=0&&a.indexOf("%",b)==b}return b?a:parseFloat(a.toString())+"px"}function R(a){return Math.round((parseFloat(a.toString())-0.5)*100)}function S(a){return Math.round(parseFloat(a.toString())*100)}function vd(a,b,c){if(Ad)a[b]=c;else a.setAttribute(b,c)}
function T(a,b){var c=a.ja.createElement("g_vml_:"+b);c.id="goog_"+za++;return c}function Cd(a){if(Ad)if(a.nb)a.lb=i;else if(a.O)a.c().innerHTML=a.c().innerHTML}p=zd.prototype;p.Rb=function(){this.nb=i};p.Pb=function(){this.nb=n;if(this.lb){this.lb=n;Cd(this)}};p.R=function(a,b){(b||this.I).c().appendChild(a.c());Cd(this)};
p.tc=function(a,b){var c=a.c();c.fillcolor="";for(var d=0;d<c.childNodes.length;d++){var e=c.childNodes[d];e.tagName=="fill"&&c.removeChild(e)}if(b instanceof Zc)if(b.B=="transparent")c.filled=n;else if(b.mb!=1){c.filled=i;d=T(this,"fill");d.opacity=Math.round(b.mb*100)+"%";d.color=b.B;c.appendChild(d)}else{c.filled=i;c.fillcolor=b.B}else c.filled=n;Cd(this)};
p.uc=function(a,b){var c=a.c();if(b){c.stroked=i;var d=b.Q;if(u(d)&&d.indexOf("px")==-1)d=parseFloat(d);else d*=Hc(this);var e=c.getElementsByTagName("stroke")[0];if(d<1){e=e||T(this,"stroke");e.opacity=d;e.oe="1px";e.color=b.B;c.appendChild(e)}else{e&&c.removeChild(e);c.strokecolor=b.B;c.strokeweight=d+"px"}}else c.stroked=n;Cd(this)};p.vc=function(a,b,c,d,e,f){a=a.c();a.style.left=R(b)+"px";a.style.top=R(c)+"px";if(d||a.rotation){a.rotation=d;a.coordsize=S(e*2)+" "+S(f*2)}};
function td(a,b,c,d,e){var f=a.style;f.position="absolute";f.left=R(b)+"px";f.top=R(c)+"px";f.width=S(d)+"px";f.height=S(e)+"px";if(a.tagName=="shape")a.coordsize=S(d)+" "+S(e)}function Dd(a,b){var c=T(a,b),d=Gc(a);td(c,0,0,d.width,d.height);return c}try{eval("document.namespaces")}catch(Ed){}p=zd.prototype;
p.U=function(){var a=this.ja.Y;if(!a.namespaces.g_vml_){Ad?a.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML"):a.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml");a.createStyleSheet().cssText="g_vml_\\:*{behavior:url(#default#VML)}"}a=this.width;var b=this.height,c=this.ja.U("div",{style:"overflow:hidden;position:relative;width:"+Bd(a)+";height:"+Bd(b)});this.k=c;var d=T(this,"group"),e=d.style;e.position="absolute";e.left=e.top=0;e.width=this.width;e.height=this.height;
d.coordsize=this.aa?S(this.aa)+" "+S(this.fb):S(a)+" "+S(b);d.coordorigin=this.za!==undefined?S(this.za)+" "+S(this.Fa):"0 0";c.appendChild(d);this.I=new rd(d,this);J(c,"resize",na(this.hc,this))};p.hc=function(){var a=vc(this.c()),b=this.I.c().style;if(a.width){b.width=a.width+"px";b.height=a.height+"px"}else{for(a=this.c();a&&a.currentStyle&&a.currentStyle.display!="none";)a=a.parentNode;a&&a.currentStyle&&yc(this.Ka,a,"propertychange",this.hc)}this.dispatchEvent("resize")};
p.M=function(){var a=this.c();return new D(a.style.pixelWidth||a.offsetWidth||1,a.style.pixelHeight||a.offsetHeight||1)};p.clear=function(){this.I.clear()};p.$b=function(a,b,c,d,e,f,h){var j=T(this,"oval");td(j,a-c,b-d,c*2,d*2);a=new sd(j,this,a,b,c,d,e,f);this.R(a,h);return a};p.drawImage=function(a,b,c,d,e,f){var h=T(this,"image");td(h,a,b,c,d);vd(h,"src",e);a=new yd(h,this);this.R(a,f);return a};
p.ac=function(a,b,c,d,e,f,h,j,k,m){var o=Dd(this,"shape"),q=T(this,"path");b="M"+R(b)+","+R(c)+"L"+R(d)+","+R(e)+"E";vd(q,"v",b);vd(q,"textpathok","true");b=T(this,"textpath");b.setAttribute("on","true");c=b.style;c.fontSize=h.size*Hc(this);c.fontFamily=h.Wa;if(f!=l)c["v-text-align"]=f;if(h.bold)c.fontWeight="bold";if(h.ic)c.fontStyle="italic";vd(b,"string",a);o.appendChild(q);o.appendChild(b);a=new xd(o,this,j,k);this.R(a,m);return a};
p.Ga=function(a,b,c,d){var e=Dd(this,"shape");vd(e,"path",wd(a));a=new ud(e,this,b,c);this.R(a,d);return a};
function wd(a){var b=[];mc(a,function(c,d){switch(c){case 0:b.push("m");Array.prototype.push.apply(b,Ea(d,S));break;case 1:b.push("l");Array.prototype.push.apply(b,Ea(d,S));break;case 2:b.push("c");Array.prototype.push.apply(b,Ea(d,S));break;case 4:b.push("x");break;case 3:var e=d[2]+d[3],f=S(d[4]-d[0]*Math.cos(A(e)));e=S(d[5]-d[1]*Math.sin(A(e)));var h=S(d[0]),j=S(d[1]);b.push("ae",f,e,h,j,Math.round(d[2]*-65536),Math.round(d[3]*-65536))}});return b.join(" ")}
p.yb=function(a,b){var c=vb(),d=c.U("div",{style:"position:absolute; visibility:hidden; font-family:"+b.Wa+"; font-size:"+b.size+"px;"});document.body.appendChild(d);d.innerHTML=a;var e=d.offsetWidth;c.removeNode(d);return e};p.Aa=function(){zd.m.Aa.call(this);this.hc();Cd(this)};p.g=function(){this.I=l;zd.m.g.call(this)};function Fd(a){this.qa=a}function Gd(a,b,c,d,e){var f=a.qa.left,h=a.qa.left+a.qa.width,j=a.qa.top+a.qa.height;a=a.qa.top;var k=0,m=1;d=d-b;e=e-c;for(var o,q,r,y=0;y<4;y++){if(y===0){o=-d;q=-(f-b)}if(y===1){o=d;q=h-b}if(y===2){o=e;q=j-c}if(y===3){o=-e;q=-(a-c)}r=q/o;if(o===0&&q<0)break;if(o<0)if(r>m)break;else{if(r>k)k=r}else if(o>0)if(r<k)break;else if(r<m)m=r}return[b+k*d,c+k*e,b+m*d,c+m*e]};function U(a,b,c,d,e,f){if(u(a)){this.w=a==Hd?b:0;this.u=a==Id?b:0;this.p=a==Jd?b:0;this.z=a==Kd?b:0;this.A=a==Ld?b:0;this.P=a==Md?b:0}else{this.w=a||0;this.u=b||0;this.p=c||0;this.z=d||0;this.A=e||0;this.P=f||0}}
U.prototype.sb=function(a){var b=Math.min(this.w,this.u,this.p,this.z,this.A,this.P),c=Math.max(this.w,this.u,this.p,this.z,this.A,this.P);if(b<0&&c>0)return l;if(!a&&b==0&&c==0)return"PT0S";c=[];b<0&&c.push("-");c.push("P");if(this.w||a)c.push(Math.abs(this.w)+"Y");if(this.u||a)c.push(Math.abs(this.u)+"M");if(this.p||a)c.push(Math.abs(this.p)+"D");if(this.z||this.A||this.P||a){c.push("T");if(this.z||a)c.push(Math.abs(this.z)+"H");if(this.A||a)c.push(Math.abs(this.A)+"M");if(this.P||a)c.push(Math.abs(this.P)+
"S")}return c.join("")};U.prototype.va=function(a){return a.w==this.w&&a.u==this.u&&a.p==this.p&&a.z==this.z&&a.A==this.A&&a.P==this.P};U.prototype.ha=function(){return new U(this.w,this.u,this.p,this.z,this.A,this.P)};var Hd="y",Id="m",Jd="d",Kd="h",Ld="n",Md="s";U.prototype.add=function(a){this.w+=a.w;this.u+=a.u;this.p+=a.p;this.z+=a.z;this.A+=a.A;this.P+=a.P};
function Nd(a,b,c){if(v(a)){this.b=new Date(a,b||0,c||1);Od(this,c||1)}else if(ha(a)){this.b=new Date(a.getFullYear(),a.getMonth(),a.getDate());Od(this,a.getDate())}else{this.b=new Date;this.b.setHours(0);this.b.setMinutes(0);this.b.setSeconds(0);this.b.setMilliseconds(0)}}p=Nd.prototype;p.Ha=0;p.Ia=3;p.ha=function(){var a=new Nd(this.b);a.Ha=this.Ha;a.Ia=this.Ia;return a};p.getFullYear=function(){return this.b.getFullYear()};p.getYear=function(){return this.getFullYear()};p.getMonth=function(){return this.b.getMonth()};
p.getDate=function(){return this.b.getDate()};p.getTime=function(){return this.b.getTime()};p.getDay=function(){return this.b.getDay()};p.getUTCFullYear=function(){return this.b.getUTCFullYear()};p.getUTCMonth=function(){return this.b.getUTCMonth()};p.getUTCDate=function(){return this.b.getUTCDate()};p.getUTCDay=function(){return this.b.getDay()};p.getUTCHours=function(){return this.b.getUTCHours()};p.getUTCMinutes=function(){return this.b.getUTCMinutes()};
function Pd(a){var b=a.getFullYear(),c=a.getMonth(),d=a.getDate();b=new Date(b,c,d);c=a.Ia||3;d=a.Ha||0;a=((b.getDay()+6)%7-d+7)%7;c=(c-d+7)%7;a=b.valueOf()+(c-a)*864E5;b=(new Date((new Date(a)).getFullYear(),0,1)).valueOf();return Math.floor(Math.round((a-b)/864E5)/7)+1}p.getTimezoneOffset=function(){return this.b.getTimezoneOffset()};function Qd(a){a=a.getTimezoneOffset();if(a==0)a="Z";else{var b=Math.abs(a)/60,c=Math.floor(b);a=(a>0?"-":"+")+x(c,2)+":"+x((b-c)*60,2)}return a}p.setFullYear=function(a){this.b.setFullYear(a)};
p.setMonth=function(a){this.b.setMonth(a)};p.setDate=function(a){this.b.setDate(a)};p.setUTCFullYear=function(a){this.b.setUTCFullYear(a)};p.setUTCMonth=function(a){this.b.setUTCMonth(a)};p.setUTCDate=function(a){this.b.setUTCDate(a)};
p.add=function(a){if(a.w||a.u){var b=this.getMonth()+a.u+a.w*12,c=this.getYear()+Math.floor(b/12);b%=12;if(b<0)b+=12;var d;a:{switch(b){case 1:d=c%4==0&&(c%100!=0||c%400==0)?29:28;break a;case 5:case 8:case 10:case 3:d=30;break a}d=31}d=Math.min(d,this.getDate());this.setDate(1);this.setFullYear(c);this.setMonth(b);this.setDate(d)}if(a.p){b=new Date(this.getYear(),this.getMonth(),this.getDate(),12);a=new Date(b.getTime()+a.p*864E5);this.setDate(1);this.setFullYear(a.getFullYear());this.setMonth(a.getMonth());
this.setDate(a.getDate());Od(this,a.getDate())}};p.sb=function(a,b){return[this.getFullYear(),x(this.getMonth()+1,2),x(this.getDate(),2)].join(a?"-":"")+(b?Qd(this):"")};p.va=function(a){return this.getYear()==a.getYear()&&this.getMonth()==a.getMonth()&&this.getDate()==a.getDate()};p.toString=function(){return this.sb()};function Od(a,b){if(a.getDate()!=b)a.b.setUTCHours(a.b.getUTCHours()+(a.getDate()<b?1:-1))}p.valueOf=function(){return this.b.valueOf()};
function V(a,b,c,d,e,f,h){this.b=v(a)?new Date(a,b||0,c||1,d||0,e||0,f||0,h||0):new Date(a?a.getTime():oa())}w(V,Nd);p=V.prototype;p.getHours=function(){return this.b.getHours()};p.getMinutes=function(){return this.b.getMinutes()};p.getSeconds=function(){return this.b.getSeconds()};p.getMilliseconds=function(){return this.b.getMilliseconds()};p.getUTCDay=function(){return this.b.getUTCDay()};p.getUTCHours=function(){return this.b.getUTCHours()};p.getUTCMinutes=function(){return this.b.getUTCMinutes()};
p.getUTCSeconds=function(){return this.b.getUTCSeconds()};p.getUTCMilliseconds=function(){return this.b.getUTCMilliseconds()};p.setHours=function(a){this.b.setHours(a)};p.setMinutes=function(a){this.b.setMinutes(a)};p.setSeconds=function(a){this.b.setSeconds(a)};p.setMilliseconds=function(a){this.b.setMilliseconds(a)};p.setUTCHours=function(a){this.b.setUTCHours(a)};p.setUTCMinutes=function(a){this.b.setUTCMinutes(a)};p.setUTCSeconds=function(a){this.b.setUTCSeconds(a)};p.setUTCMilliseconds=function(a){this.b.setUTCMilliseconds(a)};
p.add=function(a){Nd.prototype.add.call(this,a);a.z&&this.setHours(this.b.getHours()+a.z);a.A&&this.setMinutes(this.b.getMinutes()+a.A);a.P&&this.setSeconds(this.b.getSeconds()+a.P)};p.sb=function(a,b){var c=Nd.prototype.sb.call(this,a);if(a)return c+" "+x(this.getHours(),2)+":"+x(this.getMinutes(),2)+":"+x(this.getSeconds(),2)+(b?Qd(this):"");return c+"T"+x(this.getHours(),2)+x(this.getMinutes(),2)+x(this.getSeconds(),2)+(b?Qd(this):"")};p.va=function(a){return this.getTime()==a.getTime()};
p.toString=function(){return this.sb()};p.ha=function(){var a=new V(this.b);a.Ha=this.Ha;a.Ia=this.Ia;return a};function W(a,b,c,d,e,f,h){a=v(a)?Date.UTC(a,b||0,c||1,d||0,e||0,f||0,h||0):a?a.getTime():oa();this.b=new Date(a)}w(W,V);p=W.prototype;p.ha=function(){var a=new W(this.b);a.Ha=this.Ha;a.Ia=this.Ia;return a};p.add=function(a){if(a.w||a.u)Nd.prototype.add.call(this,new U(a.w,a.u));this.b=new Date(this.b.getTime()+1E3*(a.P+60*(a.A+60*(a.z+24*a.p))))};p.getTimezoneOffset=function(){return 0};p.getFullYear=V.prototype.getUTCFullYear;p.getMonth=V.prototype.getUTCMonth;p.getDate=V.prototype.getUTCDate;
p.getHours=V.prototype.getUTCHours;p.getMinutes=V.prototype.getUTCMinutes;p.getSeconds=V.prototype.getUTCSeconds;p.getMilliseconds=V.prototype.getUTCMilliseconds;p.getDay=V.prototype.getUTCDay;p.setFullYear=V.prototype.setUTCFullYear;p.setMonth=V.prototype.setUTCMonth;p.setDate=V.prototype.setUTCDate;p.setHours=V.prototype.setUTCHours;p.setMinutes=V.prototype.setUTCMinutes;p.setSeconds=V.prototype.setUTCSeconds;p.setMilliseconds=V.prototype.setUTCMilliseconds;function Rd(){this.ec=l;this.Hd=this.Pa=this.Qa=n}Rd.prototype.pb=function(a){this.min=a;this.Qa=i};Rd.prototype.Qb=function(a){this.max=a;this.Pa=i};function Sd(a,b){a.ec=b}function Td(a){if(!a.L){a.L=i;a.Uc()}}function Ud(a,b){return a.ec?a.ec(a.gb(b)):String(a.gb(b))}Rd.prototype.va=function(a,b){return this.T(a,b)===0};function Vd(a){this.N=[];this.Ub=[];this.Ua=a}function Wd(a,b){return b>=0?new W(new Date(a.N[b])):new W(new Date(0))};function Xd(){Rd.call(this);this.ya=new W(1990,6,22,8,0,0,0);this.Na=this.ya.getHours();this.qb=this.ya.getMinutes();this.od=this.ya.getSeconds();this.la=new W(1990,6,22,17,0,0,0);this.vb=this.la.getHours();this.bc=this.la.getMinutes();this.Ad=this.la.getSeconds();this.min=new W(new Date);this.min.add(new U(0,0,-1));this.max=new W(new Date);this.Ea=new Vd(this)}w(Xd,Rd);p=Xd.prototype;
p.Uc=function(){for(var a=this.Ea,b=new W(2007,0,1,a.Ua.ya.getHours(),a.Ua.ya.getMinutes(),a.Ua.ya.getSeconds()),c=Yd(a.Ua,b,new W(new Date(0))),d=new W(new Date),e=new U(0,0,1),f=0;b.getTime()<d.getTime();){if(!Zd(a.Ua,b)){a.N[f]=b.getTime();a.Ub[f]=c;c+=a.Ua.oa;f++}b.add(e)}};
p.pb=function(a){a=new W(a);$d(this,a)||(a=ae(this,a));Xd.m.pb.call(this,a);this.oa=(this.la.getHours()-this.ya.getHours()+(this.la.getMinutes()-this.ya.getMinutes())/60)*36E5;this.Kb=this.oa*5;this.ce=be(this,this.min);this.me=be(this,this.min).getTime()-this.min.getTime();this.de=ce(this,this.min);this.ne=de(this,this.min);this.le=Pd(this.min);this.Ld=this.min.getDate();this.Od=this.min.getFullYear();this.Md=this.min.getMonth();this.Nd=this.min.getTime()};
p.Qb=function(a){a=new W(a);$d(this,a)||(a=ae(this,a));Xd.m.Qb.call(this,a)};p.Nc=function(){return this.normalize(new W(8888,11,30,12,0,0,333))};
p.kd=function(a){var b=(this.max.getTime()-this.Nd)/a;a=Math.floor(b/315576E5);b-=a*315576E5;var c=Math.floor(b/26298E5);b-=c*26298E5;var d=Math.floor(b/864E5);b-=d*864E5;var e=Math.floor(b/36E5);b-=e*36E5;b=Math.floor(b/6E4);var f=new U(0);if(a>1)f.w=a+1;else if(a>1||a===1&&c>0)f.u=18;else if(c>6||c===6&&d>0)f.w=1;else if(c>3||c===3&&d>0)f.u=6;else if(c>1||c===1&&d>0)f.u=3;else if(d>14||d===14&&e>0||c>0)f.u=1;else if(d>5||d===5&&e>0)f.p=10;else if(d>2||d===2&&e>0)f.p=5;else if(d>1||d===1&&e>0)f.p=
2;else if(e>6||e===6&&b>0||d===1)f.p=1;else if(e>2||e===2&&b>0)f.z=6;else if(e>1||e===1&&b>0)f.z=2;else if(b>=30||e===1)f.z=1;else f.A=b>=15?30:b>=10?15:b>=5?10:b>=1?5:1;this.C=f};function ce(a,b){var c=new U(0,0,5-b.getDay()),d=new W(b);d.add(c);d.setHours(a.la.getHours());d.setMinutes(a.la.getMinutes());d.setSeconds(a.la.getSeconds());d.setMilliseconds(a.la.getMilliseconds());return d}function be(a,b){return new W(b.getFullYear(),b.getMonth(),b.getDate(),a.vb,a.bc,a.Ad,a.la.getMilliseconds())}
function de(a,b,c){c=c||ce(a,b);return Math.floor((c.getTime()-b.getTime())/864E5)*a.oa}function ee(a,b){var c=b.getHours();return c>a.vb||c===a.vb&&b.getMinutes()>a.bc?i:n}function $d(a,b){var c=b.getHours();return!(c<a.Na||c===a.Na&&b.getMinutes()<a.qb||ee(a,b)||Zd(a,b))}function Zd(a,b){var c=b.getDay();return c===6||c===0}
function ae(a,b){if($d(a,b))return b;var c=new W(b),d=n;if(Zd(a,c)||c.getDay()===5&&ee(a,c)){d=new U(0,0,0,0,0,0);d.p=c.getDay()===0?1:7-Math.abs(1-c.getDay());c.add(d);d=i}ee(a,c)&&!d&&c.add(new U(0,0,1,0,0,0));c.setHours(a.Na);c.setMinutes(a.qb);c.setSeconds(0);c.setMilliseconds(0);return c}
function Yd(a,b,c){if(b.qd>-1)return b.qd;var d=c.getTime(),e=b.getTime();if(e===d)return 0;var f=c||new Date,h;if(h=b.getDate()==f.getDate()){f=f||new Date;if(h=b.getMonth()==f.getMonth()){f=f||new Date;h=b.getFullYear()==f.getFullYear()}h=h}if(h)a=e-d;else{var j=be(a,c);d=(j||be(a,c)).getTime()-c.getTime();f=ce(a,c);h=de(a,c,f);var k=new W(b.getFullYear(),b.getMonth(),b.getDate(),a.Na,a.ya.getMinutes(),a.od,0),m=k.getTime();e=e-m;if(Pd(b)===Pd(c)&&b.getFullYear()===c.getFullYear())a=d+a.oa*Math.floor((m-
j.getTime())/864E5)+e;else{c=new U(0,0,1-k.getDay(),0,0,0);k=new W(k.getFullYear(),k.getMonth(),k.getDate(),a.Na,a.qb,a.od,0);k.add(c);a=d+h+Math.floor((m-f.getTime())/6048E5)*a.Kb+Math.floor((m-k.getTime())/864E5)*a.oa+e}}return b.qd=a}p.normalize=function(a){var b=new W(new Date(a));$d(this,a)||(b=ae(this,b));var c=Math.abs(Ka(this.Ea.N,b.getTime())+1)-1;a=Wd(this.Ea,c);c=this.Ea.Ub[c];if(!(c>-1))return Yd(this,b,new W(new Date(0)));return c+Yd(this,b,a)};
p.gc=function(){var a=new W(this.Od,this.Md,this.Ld,this.Na,this.qb,0,0),b=new U(0,0,0,0,0,0);if(this.C.w>0){a.setMonth(0);a.setDate(1);b.w=1}else if(this.C.u>0){a.setDate(1);b.u=1}else if(this.C.p>0)b.p=1;else if(this.C.z>0){a.setHours(this.min.getHours());a.setMinutes(0);b.z=1}else{a.setMinutes(this.C.A*Math.round(this.min.getMinutes()/this.C.A));b.A=this.C.A}a.va(this.min)||a.add(b);return this.normalize(a)};
p.Tc=function(a){a=this.gb(a);new W(a);if(this.C.w>0||this.C.u>0){this.C.w>0&&a.setMonth(0);a.setDate(1);a.add(this.C);return this.normalize(ae(this,a))}return this.normalize(fe(this,a,this.C))};p.gb=function(a){var b=Math.abs(Ka(this.Ea.Ub,a)+1)-1,c=Wd(this.Ea,b);if(a===0)return c;return ge(this,c,a-this.Ea.Ub[b])};function fe(a,b,c){var d=c.p*a.oa;Ba(c.w==0&&c.u==0);return ge(a,b,d+((((c.p*24+c.z)*60+c.A)*60+c.P)*1E3-864E5*c.p))}
function ge(a,b,c){var d=b.getTime(),e=be(a,b).getTime()-b.getTime();b=de(a,b);d+=e+b/a.oa*864E5;c-=e+b;d+=Math.floor(c/a.Kb)*6048E5;c-=Math.floor(c/a.Kb)*a.Kb;d+=(24-(a.vb+a.bc/60))*36E5+1728E5+(a.Na+a.qb/60)*36E5;d+=Math.floor(c/a.oa)*864E5;c-=Math.floor(c/a.oa)*a.oa;d+=c;return new W(new Date(d))}p.T=function(a,b){return a.getTime()>b.getTime()?1:a.getTime()<b.getTime()?-1:0};p.bd=aa();p.cd=aa();p.fc=function(){var a=new W(new Date);a.add(new U(0,0,-1));return[a,new W(new Date)]};function he(a){this.f=new X(a,l,l,l);this.i=new K;this.Ta=new K;this.td=new X(a,l,l,l)}function ie(a,b){a.f.K(b)}function je(a,b){a.td.K(b)}
he.prototype.v=function(a,b,c){this.rect=a;this.G=b;this.l=c;this.i.clear();this.Ta.clear();for(a=0;a<this.G.t.length;a++){this.i.moveTo(this.G.t[a].fa[0],this.rect.top);this.i.lineTo(this.G.t[a].fa[0],this.rect.top+this.rect.height)}for(a=0;a<this.l.t.length;a++)if(this.l.db!==this.l.t[a]){this.i.moveTo(this.rect.left,this.l.t[a].fa[1]);this.i.lineTo(this.rect.left+this.rect.width,this.l.t[a].fa[1])}else{this.Ta.moveTo(this.rect.left,this.l.db.fa[1]);this.Ta.lineTo(this.rect.left+this.rect.width,
this.l.db.fa[1])}this.Dd.ra(this.i);this.Ta.Hb()&&this.Ta.moveTo(0,0);this.ae.ra(this.Ta)};he.prototype.Da=function(a){this.Dd=a.Ga(this.i,this.f.s(),l);this.ae=a.Ga(this.Ta,this.td.s(),l)};function X(a,b,c,d){this.pa=a;this.bb=!a&&!b?new Q(1,"#000000"):b;this.jb=!a&&!c?new Xc(13,"Arial"):c;this.dc=!a&&!d?"#000000":d}X.prototype.s=function(){if(this.bb)return this.bb;return this.pa.s()};X.prototype.K=function(a){this.bb=a};function ke(a){if(a.jb)return a.jb;return ke(a.pa)}function le(a){if(a.dc)return a.dc;return le(a.pa)};function me(a,b){this.L=n;this.La=this.Ob=i;this.nc=n;this.f=new X(l,l,l,l);this.id=a;this.j=b;this.Xb=this.j[this.j.length-1];this.Xc=this.j[this.j.length-1];this.be=this.je=n}w(me,E);function ne(a,b){if(b!==a.Ob){a.Ob=b;a.L&&oe(a)}}p=me.prototype;p.K=function(a){this.f.K(a)};function pe(a,b){if(b!==a.nc){a.nc=b;a.L&&qe(a)}}
p.zb=function(a,b){var c,d,e=a?re(this,a,0,this.j)-1:0,f=b?re(this,b,0,this.j):this.j.length-1;for(e=e<=0?0:e-1;e<=f;e++){var h=this.j[e][1];if(!c||this.xa.axis.T(h,c)<0)c=h;if(!d||this.xa.axis.T(h,d)>0)d=h}return[c,d]};
p.v=function(a,b,c,d){if(!this.L){this.kb(a,b,c,d);this.L=i}if(this.La&&this.j.length>0){oe(this);this.i.clear();a=[];b=[];c=0;for(d=this.j.length;c<d;c++){if(!this.Lb||this.xa.axis.T(this.j[c][1],this.Lb[1])<0)this.Lb=this.j[c];if(!this.Jb||this.xa.axis.T(this.j[c][1],this.Jb[1])>0)this.Jb=this.j[c];b[c]=this.j[c][0]}b=se(this.wa,b);for(c=0;c<b.length;c++)if(b[c])a[a.length]=new C(b[c],Y(this.xa,this.j[c][1]));b=this.$;c=new K;var e=n,f=[];f=a[0];var h;h=b.qa.contains(f)?n:i;for(var j=1;j<a.length;j++){d=
a[j];if(b.qa.contains(d))if(h){f=Gd(b,d.x,d.y,f.x,f.y);c.moveTo(f[2],f[3]);c.lineTo(d.x,d.y);h=n;e=i}else if(e)c.lineTo(d.x,d.y);else{c.moveTo(f.x,f.y);c.lineTo(d.x,d.y);e=i}else{if(h){f=Gd(b,f.x,f.y,d.x,d.y);c.moveTo(f[0],f[1]);b.qa.contains(new C(f[2],f[3]))?c.lineTo(f[2],f[3]):c.moveTo(f[2],f[3])}else{c.moveTo(f.x,f.y);f=Gd(b,f.x,f.y,d.x,d.y);c.lineTo(f[2],f[3]);c.moveTo(d.x,d.y)}h=e=i}f=d}this.i=c;this.hb.ra(this.i);qe(this)}};
function qe(a){if(a.nc){a.Yc.v(Y(a.wa,a.Lb[0]),Y(a.xa,a.Lb[1]));a.Rc.v(Y(a.wa,a.Jb[0]),Y(a.xa,a.Jb[1]));a.Wc.v(Y(a.wa,a.Xc[0]),Y(a.xa,a.Xc[1]))}}function oe(a){a.Ob&&a.Ac.v(Y(a.wa,a.Xb[0]),Y(a.xa,a.Xb[1]))}
p.kb=function(a,b,c,d){this.$=d;this.i=new K;this.h=a;this.Fd=new Q(this.f.s().Q*3,this.f.s().B);b=Ra(Na(this.f.s().B),0.5);this.yd=new Q(this.f.s().Q,Pa(b[0],b[1],b[2]));this.hb=a.Ga(this.i,this.f.s(),l);this.Ac=new Z(a,this.f);this.Ac.K(new Q(2,this.f.s().B));this.Rc=new Z(a,this.f);this.Rc.K(new Q(1,"#007F00"));this.Yc=new Z(a,this.f);this.Yc.K(new Q(1,"#FA0B0B"));this.Wc=new Z(a,this.f);this.Wc.K(new Q(1,"#0000FF"))};
function re(a,b,c,d){var e=Math.abs(Ka(d,b,function(h,j){return a.wa.axis.T(h,j[c])})+1);e=e>=d.length?d.length-1:e;if(e>0){var f=a.wa.axis.normalize(b);b=f-a.wa.axis.normalize(d[e-1][c]);d=a.wa.axis.normalize(d[e][c])-f;if(b<d)e-=1}return e}p.g=function(){me.m.g.call(this);if(this.L){this.i.clear();Fb(this.hb.c());this.Ac.ia()}};
function Z(a,b){this.f=new X(b,l,l,l);this.Fd=new Q(this.f.s().Q*3,this.f.s().B);var c=Ra(Na(this.f.s().B),0.5);this.yd=new Q(this.f.s().Q,Pa(c[0],c[1],c[2]));this.h=a;this.L=n;this.La=i}w(Z,E);Z.prototype.K=function(a){this.f.K(a)};Z.prototype.v=function(a,b){if(!this.L){this.kb();this.L=i}this.Vb.sc(a,b)};Z.prototype.kb=function(){this.Bd=new Zc(this.f.s().B);this.Vb=this.h.$b(-10,-10,Number(this.f.s().Q),Number(this.f.s().Q),this.f.s(),this.Bd)};
Z.prototype.g=function(){if(this.L){this.Vb.xc(0,0);Fb(this.Vb.c())}};function te(a,b,c){this.e=c;this.axis=a;this.t=[]}w(te,E);
te.prototype.v=function(a){this.a=a;this.S=0;if(this.e===ue){this.H=[this.a.left,this.a.top];this.J=[this.a.left+this.a.width,this.a.top];this.S=this.J[0]-this.H[0]}if(this.e===ve){this.H=[this.a.left,this.a.top];this.J=[this.a.left+this.a.width,this.a.top];this.S=this.J[0]-this.H[0]}if(this.e===we){this.H=[this.a.left,this.a.top+this.a.height];this.J=[this.a.left+this.a.width,this.a.top+this.a.height];this.S=this.J[0]-this.H[0]}if(this.e===xe){this.H=[this.a.left,this.a.top+this.a.height];this.J=
[this.a.left+this.a.width,this.a.top+this.a.height];this.S=this.J[0]-this.H[0]}if(this.e===ye){this.H=[this.a.left,this.a.top];this.J=[this.a.left,this.a.top+this.a.height];this.S=this.J[1]-this.H[1]}if(this.e===ze){this.H=[this.a.left+this.a.width,this.a.top];this.J=[this.a.left+this.a.width,this.a.top+this.a.height];this.S=this.J[1]-this.H[1]}if(this.e===Ae){this.H=[this.a.left+this.a.width,this.a.top];this.J=[this.a.left+this.a.width,this.a.top+this.a.height];this.S=this.J[1]-this.H[1]}if(this.e===
Be){this.H=[this.a.left,this.a.top];this.J=[this.a.left,this.a.top+this.a.height];this.S=this.J[1]-this.H[1]}this.Mb=this.axis.normalize(this.axis.min);this.ad=this.axis.normalize(this.axis.max);this.ed();this.fd()};function Ce(a){return a.e===we||a.e===ve||a.e===ue||a.e===xe}function De(a){return a.e===ye||a.e===Ae||a.e===ze||a.e===Be}
function se(a,b){var c=[],d=Math.abs(Ka(b,a.axis.min,function(f,h){return a.axis.T(f,h)})+1);d=d<=0?0:d-1;var e=Math.abs(Ka(b.slice(d,b.length),a.axis.max,function(f,h){return a.axis.T(f,h)})+1)+d;e=e>=b.length-1?b.length-1:e+1;for(d=d;d<=e;d++)c[d]=Y(a,b[d]);return c}function Y(a,b){return Ee(a,a.axis.normalize(b))}
function Ee(a,b){b=(b-a.Mb)/(a.ad-a.Mb);if(Ce(a))return Math.floor(a.S*b+a.a.left);else if(De(a))return Math.floor(a.height-a.S*b-(a.height-(a.a.top+a.a.height)));else g("INVALID_ORIENTATION "+a.e)}te.prototype.g=function(){te.m.g.call(this)};var we=0,ve=1,ye=2,Ae=3,ue=4,xe=5,ze=6,Be=7;function Fe(a,b){te.call(this,a,l,b);this.X=0}w(Fe,te);p=Fe.prototype;p.fd=t;p.xb=function(){return 0};p.wb=function(){return 0};p.hd=t;p.ld=t;p.md=t;p.nd=t;p.g=function(){Fe.m.g.call(this)};p.Da=ba();p.ed=ba();function Ge(){Rd.call(this);this.min=0;this.max=1}w(Ge,Rd);p=Ge.prototype;p.kd=function(a){a=(this.max-this.min)/a;var b=Math.abs(this.max-this.min)/10,c=0;if(b<1)for(b=b;b<1;b*=10)c++;else for(b=b;b>=10;b/=10)c--;this.C=Math.ceil(a*Math.pow(10,c))/Math.pow(10,c)};p.gb=aa();p.Nc=function(){return this.normalize(this.max)*-10.1};p.Uc=t;p.normalize=function(a){return Number(a)};p.gc=function(){return this.normalize(this.min)};p.Tc=function(a){return a+this.C};
p.gc=function(){return Math.ceil(this.min/this.C)*this.C};p.bd=function(a,b,c){return a+(c&&b?c-b:this.max-this.min)*0.05};p.cd=function(a,b,c){return a-(c&&b?c-b:this.max-this.min)*0.05};p.T=function(a,b){return a>b?1:b>a?-1:0};p.fc=function(){return[0,1]};function He(a,b,c,d,e,f){this.Jd=b;this.L=n;this.f=e;this.Dc=f;this.cb=a;this.Ra=b.left;this.Sa=b.top;this.Q=b.width;this.Db=b.height;this.eb=c;this.jc=l;this.fa=[];if(this.eb===Ie){this.fa[0]=this.Ra+this.Q/2;this.fa[1]=this.Sa}else if(this.eb===Je){this.fa[0]=this.Ra+this.Q;this.fa[1]=this.Sa+this.Db/2}this.Sb=d}w(He,E);
He.prototype.Da=function(a){this.L=i;this.h=a;this.yc=new Zc(le(this.f));this.zc=new Q(0,le(this.f));var b=this.Dc===ue||this.Dc===ve?"bottom":"top";if(this.eb===Ie)this.jc=b==="bottom"?Ic(a,this.cb,this.Ra,this.Sa+this.Sb*1.1,this.Q,this.Db-this.Sb,"center",b,ke(this.f),this.zc,this.yc):Ic(a,this.cb,this.Ra,this.Sa,this.Q,this.Db-this.Sb,"center",b,ke(this.f),this.zc,this.yc);else if(this.eb===Je)this.jc=Ic(a,this.cb,this.Ra,this.Sa,this.Q-this.Sb-3,this.Db,"right","middle",ke(this.f),this.zc,this.yc);
else g("INVALID_ORIENTATION "+this.eb)};He.prototype.g=function(){He.m.g.call(this);this.L&&Fb(this.jc.c())};function Ke(a,b,c){te.call(this,a,b,c);this.f=new X(b,l,l,l);this.Ma=new X(this.f,l,l,l);this.X=7;this.H=[];this.J=[];this.t=[];this.db=l;this.W=0;this.D=new K}w(Ke,te);p=Ke.prototype;p.hd=function(a){this.f.K(a)};p.ld=function(a){this.Ma.jb=a};p.md=function(a){this.Ma.dc=a};p.nd=function(a){this.Ma.K(a)};p.Da=function(a){this.Xa=a;this.height=this.Xa.M().height;this.zd=this.Xa.Ga(this.D,this.f.s(),l);this.i=new K;this.hb=this.Xa.Ga(this.i,this.f.s(),l)};
p.ed=function(){for(var a=0;a<this.t.length;a++)this.t[a].ia();this.t.length=0;this.db=l;if(Ce(this))this.W=this.xb()*1.1;else if(De(this))this.W=this.wb()*1.1;else g("INVALID_ORIENTATION "+this.e);this.axis.kd(Math.floor(this.S/this.W));a=l;for(var b=Le(this),c=0;c<b.length;c++)if(Ce(this)){a=new L(Ee(this,b[c])-this.W/2,this.a.top,this.W,this.a.height);this.t[c]=new He(Ud(this.axis,b[c]),a,Ie,this.X,this.Ma,this.e);if(Math.abs(Math.abs(b[c])-Number(0))<=1.0E-13)this.db=this.t[this.t.length-1]}else if(De(this)){if(this.e===
ye)a=new L(this.a.left,Ee(this,b[c])-this.W/2,this.a.width,this.W);if(this.e===ze)a=new L(0,Ee(this,b[c])-this.W/2,this.a.width,this.W);if(this.e===Ae)a=new L(this.a.left,Ee(this,b[c])-this.W/2,this.a.width,this.W);if(this.e===Be)a=new L(this.a.left,Ee(this,b[c])-this.W/2,this.a.width,this.W);this.t[c]=new He(Ud(this.axis,b[c]),a,Je,this.X,this.Ma,this.e);if(Math.abs(Math.abs(b[c])-Number(0))<=1.0E-13)this.db=this.t[this.t.length-1]}else g("INVALID_ORIENTATION "+this.e)};
p.fd=function(){this.i.clear();this.D.clear();this.i.moveTo(this.H[0],this.H[1]);this.i.lineTo(this.J[0],this.J[1]);this.hb.ra(this.i);for(var a=0;a<this.t.length;a++){this.t[a].Da(this.Xa);var b=this.t[a].Jd;if(this.e===ue){this.D.moveTo(b.left+b.width/2,b.top);this.D.lineTo(b.left+b.width/2,b.top+this.X)}if(this.e===ve){this.D.moveTo(b.left+b.width/2,b.top);this.D.lineTo(b.left+b.width/2,b.top+this.X)}if(this.e===we){this.D.moveTo(b.left+b.width/2,b.top+b.height);this.D.lineTo(b.left+b.width/2,
b.top+b.height-this.X)}if(this.e===xe){this.D.moveTo(b.left+b.width/2,b.top+b.height);this.D.lineTo(b.left+b.width/2,b.top+b.height-this.X)}if(this.e===ye){this.D.moveTo(b.left,b.top+b.height/2);this.D.lineTo(b.left+this.X,b.top+b.height/2)}if(this.e===Be){this.D.moveTo(b.left,b.top+b.height/2);this.D.lineTo(b.left+this.X,b.top+b.height/2)}if(this.e===ze){this.D.moveTo(b.left+b.width,b.top+b.height/2);this.D.lineTo(b.left+b.width-this.X,b.top+b.height/2)}if(this.e===Ae){this.D.moveTo(b.left+b.width,
b.top+b.height/2);this.D.lineTo(b.left+b.width-this.X,b.top+b.height/2)}}this.zd.ra(this.D)};function Le(a){var b=[],c=a.axis.gc(),d=a.axis.normalize(a.axis.max);for(c=c;c<=d;c=a.axis.Tc(c))b[b.length]=c;return b}p.xb=function(){var a=[];a=this.axis.C?Le(this):[this.axis.Nc()];for(var b=this.Xa.yb(Ud(this.axis,a[0]),ke(this.Ma)),c=1;c<a.length;c++){var d=this.Xa.yb(Ud(this.axis,a[c]),ke(this.Ma));if(d>b)b=d}return b};p.wb=function(){return ke(this.f).size};
p.g=function(){Ke.m.g.call(this);if(this.Hd){this.i.clear();Fb(this.hb.c());for(var a=0;a<this.t.length;a++)this.t[a].ia()}};function Me(a,b,c,d){this.L=n;this.Td=this.gd=i;this.ta=u(a)?document.getElementById(a):a;a=b[0];b=b[1];b=B?new zd(a,b,void 0,void 0,void 0):bb&&(!nb("420")||cb)?new $c(a,b,void 0,void 0,void 0):new md(a,b,void 0,void 0,void 0);b.U();this.h=b;b=this.h.I;b.Bc=Kc(A(0),0,0).translate(0.5,0.5);b.h.vc(b,0.5,0.5,0,0,0);this.f=new X(l,l,l,l);this.o=c?new c:new Xd;this.r=d?new d:new Ge;this.q=[];Ne(this);this.Bb=new he(this.f)}w(Me,Bc);
function Ne(a){a.G=a.gd?new Ke(a.o,a.f,ue):new Fe(a.o,ue);a.l=a.Td?new Ke(a.r,a.f,ze):new Fe(a.r,ze)}function Oe(a,b){if(typeof b==="boolean")a.gd=b;Ne(a)}
Me.prototype.v=function(){var a=this.o.va(this.o.max,this.o.min),b=this.r.va(this.r.min,this.r.max);if(!(this.o.Qa&&this.o.Pa)||a){for(var c,d,e,f,h=0;h<this.q.length;h++){e=this.q[h].La&&this.q[h].j.length>0?this.q[h].j[0][0]:l;f=this.q[h].La&&this.q[h].j.length>0?this.q[h].j[this.q[h].j.length-1][0]:l;if(e!==l&&(c===undefined||this.o.T(e,c)<0))c=e;if(f!==l&&(d===undefined||this.o.T(f,d)>0))d=f}c=c===undefined||d===undefined||this.o.va(c,d)?this.o.fc():[c,d];if(!this.o.Qa||a){this.o.pb(c[0]);this.o.Qa=
n}if(!this.o.Pa||a){this.o.Qb(c[1]);this.o.Pa=n}}if(!(this.r.Qa&&this.r.Pa)||b){a=this.zb();if(!this.r.Qa||b){this.r.pb(a[0]);this.r.Qa=n}if(!this.r.Pa||b){this.r.Qb(a[1]);this.r.Pa=n}}Td(this.r);Td(this.o);if(!this.L){this.kb();this.L=i}this.h.Rb();this.o.C=l;this.r.C=l;b=Math.floor((this.G.wb()+this.G.X)*1.05);a=Math.floor((this.l.xb()+this.l.X)*1.1);c=Math.floor(this.l.wb()*1.05/2);d=Math.floor(this.G.xb()*1.05/2);e=new C;f=new C;h=new C;var j=this.h.M().width-2*d;if(this.l.e===ye||this.l.e===
ze)j-=a;var k=this.h.M().height-2*c;if(this.G.e===we||this.G.e===ue)k-=b;if(this.l.e===ye){e.x=d;e.y=c;h.x=j+d;f.x=d}if(this.l.e===ze){e.x=a;e.y=c;h.x=0;f.x=a}if(this.l.e===Ae){e.x=d;e.y=c;h.x=d+j-a;f.x=d}if(this.l.e===Be){e.x=d;e.y=c;h.x=d;f.x=d}if(this.G.e===ue){f.y=k+c;h.y=c;e.y=c}if(this.G.e===we){f.y=0;h.y=b;e.y=b}if(this.G.e===ve){f.y=0;h.y=0;e.y=0}if(this.G.e===xe){f.y=k-b+c;h.y=c;e.y=c}this.mc=new L(e.x,e.y,j,k);this.xd=new L(h.x,h.y,a,k);this.wd=new L(f.x,f.y,j,b);this.$.qa=this.mc;this.l.v(this.xd);
this.G.v(this.wd);this.Bb.v(this.mc,this.G,this.l);for(b=0;b<this.q.length;b++)this.q[b].v(this.h,this.G,this.l,this.$);this.h.Pb()};
Me.prototype.kb=function(){var a=this;Ec(this.h,this.ta);this.Bb.Da(this.h);this.G.Da(this.h);this.l.Da(this.h);this.$=new Fd(this.mc);J(this.ta,"mousemove",function(b){var c=b.clientX-sc(a.ta).x,d=a.G,e=d.ad-d.Mb,f;if(Ce(d))f=(c-d.a.left)/d.S;else if(De(d))f=(d.height-(c+(d.height-(d.a.top+d.a.height))))/d.S;else g("INVALID_ORIENTATION "+d.e);if(f<0)f=0;else if(f>1)f=1;c=d.axis.gb(d.Mb+f*e);a.h.Rb();for(d=0;d<a.q.length;d++){e=a.q[d];if(e.Ob){e.Xb=e.j[re(e,c,0,e.j)];e.La&&oe(e)}}a.h.Pb();a.dispatchEvent(b)},
i)};Me.prototype.zb=function(){for(var a,b,c,d,e=0;e<this.q.length;e++){c=this.q[e].La?this.q[e].zb(this.o.min,this.o.max)[0]:l;d=this.q[e].La?this.q[e].zb(this.o.min,this.o.max)[1]:l;if(c!==l&&(this.r.T(c,a)<0||a===undefined))a=c;if(d!==l&&(this.r.T(d,b)>0||b===undefined))b=d}return a===undefined||b===undefined||this.r.va(a,b)?this.r.fc():[this.r.cd(a,a,b),this.r.bd(b,a,b)]};
function Pe(a,b){a:for(var c=b.id,d=0;d<a.q.length;d++)if(a.q[d].id===c){c=a;d=d;c.q[d].ia();Ia(c.q,d,1);break a}b.wa=a.G;b.xa=a.l;a.q[a.q.length]=b}var Ie=0,Je=1;var $,Qe,Re,Se;
function Te(a,b){$=new Me(b,[280,200],Ge,Ge);$.r.pb(0);ie($.Bb,new Q(1,"#ededed"));je($.Bb,new Q(1,"#b0c1d0"));Sd($.o,function(k){return k=k.toFixed(0)});Sd($.r,function(k){return k=k.toFixed(0)});Oe($,n);$.l.hd(new Q(1,"#999999"));$.l.nd(new Q(1,"#999999"));$.l.ld(new Xc(10,"Arial,helvetica,sans-serif"));$.l.md("#0b333c");Qe=new me("red",[]);Re=new me("green",[]);Se=new me("blue",[]);Qe.K(new Q(1,"#C00000"));Re.K(new Q(1,"#00C000"));Se.K(new Q(1,"#0000C0"));pe(Qe,n);pe(Re,n);pe(Se,n);ne(Qe,n);ne(Re,
n);ne(Se,n);Pe($,Qe);Pe($,Re);Pe($,Se);var c=document.getElementById(a),d=new D(c.width,c.height),e=c.getContext("2d"),f,h=new Image;h.src="kitten.png";h.onload=function(){e.lineWidth=3;e.drawImage(h,0,0);f=e.getImageData(0,0,d.width,d.height).data};var j=l;J(c,"mousedown",function(k){var m=sc(c);j=new C(k.clientX-m.x,k.clientY-m.y);k.preventDefault()});J(c,"mousemove",function(k){if(j){var m=sc(c);k=new C(k.clientX-m.x,k.clientY-m.y);m=Math.floor(Math.sqrt(Math.pow(j.x-k.x,2)+Math.pow(j.y-k.y,2)));
if(m>1){e.drawImage(h,0,0);e.beginPath();e.moveTo(j.x,j.y);e.lineTo(k.x,k.y);e.closePath();e.stroke();Qe.j=[];Re.j=[];Se.j=[];for(var o=0;o<m;o++){var q=Math.floor(j.y+(k.y-j.y)*o/m)*d.width*4+Math.floor(j.x+(k.x-j.x)*o/m)*4;Qe.j.push([o,f[q]]);Re.j.push([o,f[q+1]]);Se.j.push([o,f[q+2]])}$.v()}}});J(window.document.body,"mouseup",function(){j=l})}var Ue="scottlogic.chart.examples.imageDataExample.load".split("."),Ve=s;!(Ue[0]in Ve)&&Ve.execScript&&Ve.execScript("var "+Ue[0]);
for(var We;Ue.length&&(We=Ue.shift());)if(!Ue.length&&Te!==undefined)Ve[We]=Te;else Ve=Ve[We]?Ve[We]:Ve[We]={};
</script>
</head>
<body onload="scottlogic.chart.examples.imageDataExample.load('canvas', 'chartcanvas')">
<div style="float:left;width:300px">
  <!-- <a href="http://www.flickr.com/photos/clevergrrl/218312595/sizes/s/in/photostream/">CC Clevergrrl</a> -->
  <div style="float:left; width:300px;height:200px" id="chartcanvas">
  </div>
  <canvas style="float:left;margin:10px 0 0 0" id="canvas" height="200" width="280" title="Use the mouse to 'drag' a line across the image."></canvas>
</body>
</html>
